Posted in Javascript onDecember 14, 2013
如下所示:
<html> <head> <script language="javascript" type="text/javascript"> //双击鼠标滚动屏幕的代码 var currentpos,timer; function initialize() { timer=setInterval("scrollwindow()",30); } function sc() { clearInterval(timer); } function scrollwindow() { currentpos=document.body.scrollTop; window.scroll(0,++currentpos); if(currentpos !=document.body.scrollTop) { sc(); } } document.onmousedown=sc; //停止 document.ondblclick=initialize; //开始 </script> </head> <body> <% for i=1 to 100 %> <p>双击屏幕滚动的Js代码</p> <% next %> </body> </html>
Js实现双击鼠标自动滚动屏幕的示例代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@