兼容多浏览左右浮动广告代码

兼容多浏览左右浮动广告代码
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("<DIV style="FLOAT: right;WIDTH: 1px">");
document.write("<DIV id=backr style="Z-INDEX: 10; margin-top: 180px;RIGHT: 0px; WIDTH: 300px; POSITION: absolute; HEIGHT: 560px; TEXT-ALIGN: center">");
document.write("fdsfsfdsfdsfd");
document.write("</DIV></DIV>");

时间: 2024-10-27 07:30:17

兼容多浏览左右浮动广告代码的相关文章

兼容多浏览器右下角浮动广告js代码

兼容多浏览器右下角浮动广告js代码 var opp; var wh; var hi; var dialogright = function(title,content,height,width) {  var my = this;  this._title = title;  this._content = content;  this._height = height;  hi = height;  this._width = width;  wh = width;  this._time =

兼容ie6,ie7,ie8,firefox左下角浮动广告代码

提示:您可以先修改部分代码再运行 兼容ie6,ie7,ie8,firefox左下角浮动广告代码 子鼠测试. //这一行写了这个DIV是绝对定位,最好再加一下z-index:边框为1px的实线黑色边:距右边有0PX; ID=AD: 提示:您可以先修改部分代码再运行

js 右下角浮动广告代码(四种代码)

// 随即广告 document.write("<span id="tmpmsgdiv"></span>"); var randoms=math.floor(math.random()*5+1); if(randoms%2==0){    str="<a href="http://www.111cn.net/?tn=codefans" target="_blank"><img

兼容多浏览js获取来路代码

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-

网页两侧浮动广告代码

浮动|广告|网页 在BODY内加入以下代码: "< DIV id=floater1 style="Z-INDEX: 100; LEFT: 10px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 160px; height: 100px;" >   左邊的東西,可以是圖片,表格  < /DIV >  < DIV id=floater style="Z-INDEX:

可关闭与最小化的右下角浮动广告代码_广告代码

_× 浮动窗口标题: 浮动窗口内容:欢迎提出宝贵意见,谢谢!

javascript 左右下角滚动浮动广告代码

  <div id="watermark" style="position:absolute">  <table width=170 height=100 cellpadding=0 cellspacing=0>      <tr>          <td bgcolor=#e9e8ee class=solution2></td>      </tr>       <tr>    

javascript 右下角浮动广告代码

document.writeln("<div id="qqaddiv" style="position:absolute; z-index: 100;"> "); document.writeln("<a href=http://www.111cn.net/ target=_blank onclick='closer()'><img src=/images/xxxxzz.gif border=0>&l

网页浮动广告代码

<script type="text/javascript"> var xPos = 10; var yPos = 10; var step = 1; var delay = 30; var height = 0; var Hoffset = 0; var Woffset = 0; var yon = 0; var xon = 0; var pause = true; var interval; img1.style.top = yPos; function changeP