双击网页自动滚动
2014-10-09来源:易贤网

var currentpos,timer;

function initialize()

{

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

}

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>//" width="800"> 〈SCRIPT LANGUAGE="JavaScript">

var currentpos,timer;

function initialize()

{

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

}

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>//

更多信息请查看IT技术专栏

2025公考·省考培训课程试听预约报名

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
推荐信息