<html>

<head>
<meta charset="gb2312"></head>

<body>

<div >//这两个属性是必须加上的

<div >

我是第一行<br>

我是第二行<br>

我是第三行<br>

我是第四行<br>

。。。。。<br>

我是第N行<br>

</div>

<div ></div>

</div>

</body>

</html>

<script type="text/javascript">

var scrollSpeed=50;//值越大,滚动的越慢

son2.innerHTML=son1.innerHTML;

function ScrollMarquee(){

if(son2.offsetTop-father.scrollTop<=0){

father.scrollTop-=son1.offsetHeight;

}

else{

father.scrollTop++;

}

}

var ScrollTime=setInterval(ScrollMarquee,scrollSpeed);

//father.onmouseover=function(){clearInterval(ScrollingMar);};//鼠标放在上面停止滚动

//father.onmouseout=function(){ScrollTime=setInterval(ScrollMarquee,scrollSpeed);};//鼠标离开,重新滚动

</script>

相关文章:

  • 2021-09-21
  • 2021-11-01
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-09-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
相关资源
相似解决方案