第1个回答 2012-01-05
#gg_box{width:263px; height:47px; }
#gg{width:263px; height:43px;}
<div id="gg_box">
<div id="gg">
gsdfgdfgfdgfgfdgfdgfdgfdgfdgg<br/>
</div>
</div>
<script language="javascript">
var box=document.getElementById("gg"),can=true;
box.innerHTML+=box.innerHTML;
box.onmouseover=function(){can=false};
box.onmouseout=function(){can=true};
new function (){
var stop=box.scrollTop%43==0&&!can;
if(!stop)box.scrollTop==parseInt(box.scrollHeight/2)?box.scrollTop=0:box.scrollTop++;
setTimeout(arguments.callee,box.scrollTop%43?10:1000);
};
</script>