如何在jsp页面上只播放一个弹出的onclick链接

时间:2014-06-23 12:37:19

标签: javascript jsp

Javascript文件

    <script type="text/javascript">
        function voddisplay(a,b) { 
            `document.getElementById(b).innerHTML="<embed type='application/x`-`shockwave-flash' src='flash/player.swf' width='500' height='400' allowscriptaccess='always'` allowfullscreen='true' `flashvars='file="+a+"&image=preview.jpg&autostart=true'/>";`
        }
 </script> 

我的JSP页面

<%
    arr_pubitr = arr_public.iterator();
     int myvaluep=0;
     while(arr_pubitr.hasNext()){
     pb = arr_pubitr.next();
     String url = "http://ar.fun2shoot.com/"+pb.getContent_id()+".flv";
    myvaluep++;
 %>
    <div class="rightdata">
<a href="javascript:void(0);" style="text-decoration: none;" 
    `onclick="return hs.htmlExpand(this , { width: 510, objectWidth: 510, objectHeight:`  `465,height: 465}),voddisplay('<%=url%>', 'abc<%=myvaluep%>')"  class="playbtn">preview </a>`

<div class="highslide-maincontent">
 <div id="abc<%=myvaluep%>" class="buyme"></div>Loading Please... Wait</div>
<div>
  <img src="<%=pb.getPreview() %>"  title ="<%=pb.getTitle() %>"/>`enter code here`
    <input style="margin-top: 5px;" type="checkbox"  name="video_cont"  value="<%=pb.getContent_id() %>"/>
     <%=pb.getView_count() %> views
     </div>
</div>

只需要一个弹出窗口即可进行不同的链接播放

0 个答案:

没有答案