06 2017 档案

摘要:window.onscroll=function(){ var t =document.body.scrollTop;//变量t就是滚动条滚动时,到顶部的距离 var l =document.body.scrollLeft;//变量l就是滚动条滚动时,到左部的距离 console.log(t,l) } 阅读全文
posted @ 2017-06-15 17:22 超级玛丽和大力水手 阅读(321) 评论(0) 推荐(0)
摘要:1、最简单,最消耗资源的 2、选择性初始化 3、sina 4、yahoo 5、博客园 阅读全文
posted @ 2017-06-14 10:03 超级玛丽和大力水手 阅读(151) 评论(0) 推荐(0)
摘要:HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth scrollHeight: 获取对象的滚动高度。 scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离 scrollTop:设置或获取位于对象最顶端和窗口中 阅读全文
posted @ 2017-06-12 18:00 超级玛丽和大力水手 阅读(145) 评论(0) 推荐(0)
摘要:var box=document.getElementById("box"); // 指定一个要移动底图的容器 var num=0; // 声明原始值num=0 box.onclick=function(){ // 一个触发事件 ... 阅读全文
posted @ 2017-06-08 15:32 超级玛丽和大力水手 阅读(665) 评论(0) 推荐(0)
摘要:var box=document.getElementById("box"); // 指定一个要移动底图的容器 var num=0; // 声明原始值num=0 box.onclick=function(){ // 一个触发事件 ... 阅读全文
posted @ 2017-06-08 15:23 超级玛丽和大力水手 阅读(202) 评论(0) 推荐(0)
摘要:// 页面跳转 var t=3;//设定跳转的时间 setInterval("refer()",1000); //启动1秒定时 function refer(){ if(t==0){ location.hr... 阅读全文
posted @ 2017-06-08 13:51 超级玛丽和大力水手 阅读(372) 评论(0) 推荐(0)