<div class="module cl">
<table border="0" width="950" cellspacing="5" cellpadding="0">
<tr>
<td width="11"><img id="r_l" onclick="r_left()"src="static/image/common/panpanluo_button_l.gif">
</td>
<td>
<TABLE cellSpacing=0 cellPadding=0 width=926 border=0>
<TBODY>
<TR>
<TD vAlign=top background="">
<TABLE cellSpacing=0 cellPadding=0 width=916 border=0>
<TBODY>
<TR>
<TD vAlign=center align=middle >
<DIV id=demo >
<TABLE cellPadding=0 width="100%" align=left border=0
cellspace="0">
<TBODY>
<TR>
<TD id=demo1 vAlign=top>
<TABLE cellSpacing=1 cellPadding=1>
<TBODY>
<TR vAlign=top>
<TD vAlign=top noWrap>
<DIV align=right>
<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR>
[loop]
<TD align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=120
align=center border=0>
<TBODY>marquee marquee
<TR>
<TD align=middle >
<a href="{url}"{target}><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a>
</TD></TR>
</TBODY></TABLE></TD>
[/loop] </TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></TD>
<TD id=demo2 width="0"></TD>
</TR></TBODY></TABLE></DIV>
<SCRIPT>
var dir=1//每步移动像素,数大为快
var speed=18//循环周期(毫秒)数大为慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){//正常移动
//alert(demo2.offsetWidth+"\n"+demo.scrollLeft)
if (dir>0 && (demo2.offsetWidth-demo.scrollLeft)<=0) demo.scrollLeft=0
if (dir<0 &&(demo.scrollLeft<=0)) demo.scrollLeft=demo2.offsetWidth
demo.scrollLeft+=dir
}
function r_left(){if (dir=-1)dir=1}//换向左移
function r_right(){if (dir=1)dir=-1}//换向右移
var MyMar=setInterval(Marquee,speed)
</SCRIPT>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</td>
<td width="11"><img id="r_r" onclick="r_right()" src="static/image/common/panpanluo_button_r.gif">
</td>
</tr>
</table></div>
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论