<DIV id=demo style="OVERFLOW: hidden; WIDTH:500PX; HEIGHT: 300px"; >
当把WIDTH设成另外一个值为变成,图片滚动到一部份就不滚动了.
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD id=demo1>
<TABLE cellPadding=5 cellSpacing=0 bgcolor="#ABD8E9">
<TBODY>
<TR>
<TD vAlign=center align=middle><img src="http://61.136.199.184/image1/pic/xyfj_003.jpg" width="120" height="100"><img src="http://61.136.199.184/image1/pic/xyfj_006.jpg" width="120" height="100"><img src="http://61.136.199.184/image1/pic/xyfj_007.jpg" width="120" height="100"><img src="http://61.136.199.184/image1/pic/xyfj_005.jpg" width="120" height="100"><img src="http://61.136.199.184/image1/pic/xyfj_016.jpg" width="120" height="100"><img src="http://61.136.199.184/image1/pic/xyfj_020.jpg" width="120" height="100">
</TD>
<TD vAlign=center align=middle><A
href="#">abclink</A></TD>
<TD vAlign=center align=middle><A
href="#">link</A></TD>
<TD vAlign=center align=middle> </TD>
</TR></TBODY></TABLE></TD>
<TD id=demo2></TD></TR></TBODY></TABLE></DIV>
<SCRIPT>
var speed=20
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0) 'demo2.offsetWidth,demo.scrollLeft分别是哪里到哪里的值,应该怎么理解
demo.scrollLeft-=demo1.offsetWidth '
else{
demo.scrollLeft++
}
}
demo.onmouseover=function(){clearInterval(MyMar)}
demo.onmouseout=function(){MyMar=setInterval(Marquee,speed)}
window.onload = function(){
if(demo.offsetWidth < demo1.offsetWidth){
demo2.innerHTML=demo1.innerHTML
var MyMar=setInterval(Marquee,speed)
}
}
</SCRIPT>