6、双击滚屏单击停止

6、双击滚屏单击停止

<!--将以下代码加入HTML<Body></Body>之间-->

<script language"javascript">

var currentpos,timer;

function initialize()

{

timer=setInterval("scrollwindow()",10);

}

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>

 

 

 

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p>1</p>

<p> </p>

 

</body>

 

</html>

 

Write a comment

Comments: 0