js 鼠标双击滚动单击停止
在script中加入代码
var currentpos,timer; function initialize() { timer=setInterval("scrollwindow()",3); } function sc(){ clearInterval(timer); } function scrollwindow(){ if(document.body.scrollTop){//加了DTD头时,document.body.scrollTop值始终为0,在此判断一下 currentpos=document.body.scrollTop; window.scroll(0,++currentpos); if (currentpos != document.body.scrollTop){ sc(); } } else{ currentpos=document.documentElement.scrollTop; window.scroll(0,++currentpos); if (currentpos != document.documentElement.scrollTop){ sc(); } } } document.onmousedown=sc document.ondblclick=initialize