-
阻止瀏覽器的默認(rèn)行為查看全部
-
2:定時(shí)器查看全部
-
1:滾動(dòng)條滾動(dòng)時(shí)觸發(fā)的事件查看全部
-
源代碼2.查看全部
-
源代碼1.查看全部
-
滾動(dòng)中時(shí)用戶移動(dòng)滾輪的事件處理查看全部
-
windows.onload(頁(yè)面加載完后出發(fā))查看全部
-
主要知識(shí)點(diǎn)查看全部
-
實(shí)現(xiàn)回到頂部: 知識(shí)點(diǎn)一:獲取scrollup,即滾動(dòng)條距離頂部距離。document。documentElement.scrollTop(大部分瀏覽器).body.scrollTop(chorme瀏覽器) 知識(shí)點(diǎn)二:獲得頁(yè)面可視區(qū)高度:document.documentElement.clientHeight 知識(shí)點(diǎn)三:timer=setInterval(fuuc,interval) clearInterval(timer)查看全部
-
知識(shí)點(diǎn)查看全部
-
照著老師的改寫了一個(gè)jQuery的版本: $(function(){ var timer=null; var isTop=true; var clientHeight=$(document).height(); $(window).scroll(function(){ var osTop=$(document).scrollTop(); if(osTop>=clientHeight){ $("#a1").css("display","inline-block"); }else{查看全部
-
本課代碼。。 圖片自己看著辦 <!DOCTYPE> <html lang="zh-CN"> <head> <meta charset='utf-8' /> <title>Javascript 返回頂部</title> <style type="text/css"> #btn { width:64px; height:113px; position:fixed; right:15px; bottom:10px; display: none; background:url(./backtop.png) no-repeat lef查看全部
-
window.onscroll = function(){};滾動(dòng)條滾動(dòng)觸發(fā)事件查看全部
-
console.log();瀏覽器后臺(tái)打印執(zhí)行日志查看全部
-
數(shù)學(xué)函數(shù),Math.floor();小數(shù)點(diǎn)向下舍入(自己理解:直接忽略小數(shù)點(diǎn)后面的數(shù)值)查看全部
舉報(bào)
0/150
提交
取消