06 2017 档案
摘要:window.onscroll=function(){ var t =document.body.scrollTop;//变量t就是滚动条滚动时,到顶部的距离 var l =document.body.scrollLeft;//变量l就是滚动条滚动时,到左部的距离 console.log(t,l) }
阅读全文
摘要:1、最简单,最消耗资源的 2、选择性初始化 3、sina 4、yahoo 5、博客园
阅读全文
摘要:HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth scrollHeight: 获取对象的滚动高度。 scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离 scrollTop:设置或获取位于对象最顶端和窗口中
阅读全文
摘要:var box=document.getElementById("box"); // 指定一个要移动底图的容器 var num=0; // 声明原始值num=0 box.onclick=function(){ // 一个触发事件 ...
阅读全文
摘要:var box=document.getElementById("box"); // 指定一个要移动底图的容器 var num=0; // 声明原始值num=0 box.onclick=function(){ // 一个触发事件 ...
阅读全文
摘要:// 页面跳转 var t=3;//设定跳转的时间 setInterval("refer()",1000); //启动1秒定时 function refer(){ if(t==0){ location.hr...
阅读全文