html代码大全 双击鼠标左键来滚动背景,单击停止
提问人:刘团圆发布时间:2020-11-02
<SCRIPT language=javascript>
var currentpos,timer;
function initialize()
{
timer=setInterval("scrollwindow()",16);
}
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>
继续查找其他问题的答案?
相关视频回答
回复(0)
点击加载更多评论>>