最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
兼容多浏览左右浮动广告代码
时间:2010-04-10 编辑:简简单单 来源:一聚教程网
兼容多浏览左右浮动广告代码
var w3c = (document.getElementById) ? true : false;
var agt = navigator.userAgent.toLowerCase();
var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1) && (agt.indexOf("omniweb") == -1));
var mymovey = new Number();
function IeTrueBody(){
return (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body;
}
function GetScrollTop(){
return ie ? IeTrueBody().scrollTop : window.pageYOffset;
}
function heartBeat(){
diffY=GetScrollTop();
mymovey += Math.floor((diffY-document.getElementById('backr').style.top.replace("px","")+0)*0.1);
document.getElementById('backr').style.top = mymovey+"px";
}
window.setInterval("heartBeat()",1);
function hidethis(){
document.getElementById('backr').style.display = "none";
}
document.write("
document.write("
document.write("fdsfsfdsfdsfd");
document.write("
-
上一个: js 检测判断fckeditor是否为空
-
下一个: 最新QQ在线客服强制对话代码
相关文章
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31
- html使用表单标签实现注册页面代码展示 10-31
- 使用HTML截图并保存为本地图片的代码展示 10-31