求双击鼠标网页会向下慢慢移动的代码.....
求双击鼠标网页会向下慢慢移动的代码.....
脚本说明:
把如下代码加入<body>区域中
<script language="javascript" type="text/javascript">
<!--
var cntr=0
var intervalid
var max_height=500 //the height of the page
//adjust the max_height with the height of your page
//It scrolls about 25 pixels per second
function do_scroll() {
cntr+=6
self.scroll(0,cntr)
if(cntr >max_height) {
cntr =-5
}
//restart the scrolling
if(cntr<0){
cntr+=6
}
}
//stop the scroll
function clear_interval(){
clearInterval(intervalid)
return false
}
function loop_scroll(){
intervalid=setInterval("do_scroll()",250)
status="!!!!!!!!!!! MOUSEOVER TO STOP AUTOSCROLL,MOUSEOUT TO RESTART !!!!!!!!!!!!"
return false
}
//-->
</script>
<script language="javascript">
<!--
document.onmouseover=clear_interval
document.onmouseout=loop_scroll
-->
</script>