<html>
<head>
<title>index</title></head>
<body>
<div id="demo" style="overflow: hidden; height: 20; 500; background: #f4f4f4;
color: #ffffff">
<div id="demo1">
<div style="height: 20; 1000;">123456789123456789</div></div>
</div>
<input type="text" id="sl" ></input>
<input type="text" id="sw" ></input>
<script type="text/javascript">
var speed = 25;
//demo2.innerHTML = demo1.innerHTML;
function Marquee() {
if(demo.scrollLeft>=demo.clientWidth ){
demo.scrollLeft=0;
}
else{
demo.scrollLeft++;
document.getElementById("sl").value=demo.scrollLeft;
document.getElementById("sw").value=demo.clientWidth;
}
}
var MyMar = setInterval(Marquee, speed);
demo.onmouseover = function () { clearInterval(MyMar) };
demo.onmouseout = function () { MyMar = setInterval(Marquee, speed) };
</script>
</body>
</html>