高手帮我看看下面的javascript代码.
为什么我把demo里面的width改为400滚动就不流畅了啊?
<div id=demo style= "overflow:hidden;width:200px;border:2px solid #e0e0e0;padding:2px; " onmouseover= "stopscroll(); " onmouseout= "doscroll() ">
<div id= "demo1 " style= "white-space:nowrap;padding:0; ">
<a href= "javascript:alert( '发表新贴 '); "> <img src= "http://www.iecn.net/forum/images/iecn/newthread.gif " height=20 width=104
border=0> </a>
<a href= "javascript:alert( '发表回复 '); "> <img src= "http://www.iecn.net/forum/images/iecn/reply.gif " height=20 width=104
border=0> </a>
</div>
</div>
<script>
var t=demo.scrollWidth
demo1.innerHTML+=demo1.innerHTML
function doMarquee()
{
demo.scrollLeft=demo.scrollLeft <demo.scrollWidth-demo.offsetWidth?demo.scrollLeft+1:t-demo.offsetWidth
}
function doscroll()
{
sc=setInterval(doMarquee,20)
}
function stopscroll()
{
clearInterval(sc)
}
doscroll()
</script>
------解决方案--------------------帮顶,这个跟width有关系吗?
------解决方案--------------------不是卡,是活动太大吧