html代碼大全 雙擊鼠標左鍵來滾動背景,單擊停止
提問人:劉團圓發(fā)布時間: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>
繼續(xù)查找其他問題的答案?
相關視頻回答
點擊加載更多評論>>