一个作为iframe嵌入的frame 作用是滚动浏览

代码片断:

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
……

<script>
 var actualwidth='';
 var copyspeed=2;
 var part1,part2;
 function fillup(){

  //他们用于循环取得数据:
  part1=document.all.part2;//第一个显示框
  part2=document.all.part3;//第二个显示框
  actualwidth=part1.offsetWidth;
  part2.style.left=actualwidth+20;
  lefttime=setInterval("slideleft()",30);
 }
 window.οnlοad=fillup;

 function slideleft(){
  if (parseInt(part1.style.left)>(actualwidth*(-1)+5))
   part1.style.left=parseInt(part1.style.left)-copyspeed;
  else
   part1.style.left=parseInt(part2.style.left)+actualwidth+5;

  if (parseInt(part2.style.left)>(actualwidth*(-1)+5))
   part2.style.left=parseInt(part2.style.left)-copyspeed;
  else
   part2.style.left=parseInt(part1.style.left)+actualwidth+5;
 }
</script>
<div style="position:absolute;width:718; height:205;vertical-align:top" onMouseover="copyspeed=0" onMouseout="copyspeed=2">
     <div id="part2" style="position:absolute;left:0;top:0">
     <table><tr>
 <%if(ds!=null){
  while(ds.next()){
  %>
                <td>
                    <table width="130" border="1" cellpadding="0" cellspacing="0" >
                      <!--DWLayoutTable-->
                      <tr>
                        <td height="128" valign="top"><input type="image" onClick="window.open('<%=AppPath%>/poll/index.jsp','');return;" src="<%=AppPath+ds.getString("mpath")%>"  width="128" height="128"></td>
                      </tr>
                      <tr>
                        <td height="68" valign="middle"><span style="font-size: 12px; color:#F22BED;line-height: 24px;">&nbsp;&nbsp;<IMG SRC="<%=AppPath%>/poll/images/index_24.gif"
        WIDTH=7 HEIGHT=7 ALT="">&nbsp;<%=CodeFilter.KillNull(ds.getString("gameName"))%><br>
                          &nbsp;&nbsp;<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT="">&nbsp;目前票数:<%=ds.getString("hits")%><br>
                          &nbsp;&nbsp;<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT="">&nbsp;来自:<%=CodeFilter.KillNull(ds.getString("district"))%></span></td>
                      </tr>
                    </table>
    </td>
           <%
     }
  }%> 
   </tr></table>
  </div>
  <div id="part3" style="position:absolute;left:-1000;top:0">
   <table><tr>
 <%if(ds!=null){
     ds.beforeFirst();
  while(ds.next()){
  %>
                <td>
                    <table width="130" border="1" cellpadding="0" cellspacing="0"
                      <tr>
                        <td height="128" valign="top"><input type="image" onClick="window.open('<%=AppPath%>/poll/index.jsp','');return;" src="<%=AppPath+ds.getString("mpath")%>"  width="128" height="128"></td>
                      </tr>
                      <tr>
                        <td height="68" valign="middle" ><span style="font-size: 12px; color:#F22BED;line-height: 24px;">&nbsp;&nbsp;<IMG SRC="<%=AppPath%>/poll/images/index_24.gif"
        WIDTH=7 HEIGHT=7 ALT="">&nbsp;<%=CodeFilter.KillNull(ds.getString("gameName"))%><br>
                          &nbsp;&nbsp;<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT="">&nbsp;目前票数:<%=ds.getString("hits")%><br>
                          &nbsp;&nbsp;<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT="">&nbsp;来自:<%=CodeFilter.KillNull(ds.getString("district"))%></span></td>
                      </tr>
                    </table>
    </td>
           <%
     }
  }%> 
   </tr></table>
 </div>
</div>

……
</body>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值