代码片断:
<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;"> <IMG SRC="<%=AppPath%>/poll/images/index_24.gif"
WIDTH=7 HEIGHT=7 ALT=""> <%=CodeFilter.KillNull(ds.getString("gameName"))%><br>
<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT=""> 目前票数:<%=ds.getString("hits")%><br>
<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT=""> 来自:<%=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;"> <IMG SRC="<%=AppPath%>/poll/images/index_24.gif"
WIDTH=7 HEIGHT=7 ALT=""> <%=CodeFilter.KillNull(ds.getString("gameName"))%><br>
<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT=""> 目前票数:<%=ds.getString("hits")%><br>
<IMG SRC="<%=AppPath%>/poll/images/index_24.gif" WIDTH=7 HEIGHT=7 ALT=""> 来自:<%=CodeFilter.KillNull(ds.getString("district"))%></span></td>
</tr>
</table>
</td>
<%
}
}%>
</tr></table>
</div>
</div>
……
</body>