开源中文网

您的位置: 首页 > 编程开发 > javascript > javascript编程 > 正文

左右两侧的广告代码 简单

来源: 网络整理  作者: 佚名

<SCRIPT>function initEcAd(LName,RName) {
document.all.NowAd_left.style.posTop = -200;
document.all.NowAd_left.style.visibility = 'visible';
document.all.NowAd_left.style.position = 'absolute';
document.all.NowAd_right.style.posTop = -200;
document.all.NowAd_right.style.visibility = 'visible';
document.all.NowAd_right.style.position = 'absolute';
MoveLeftLayer(LName);
MoveRightLayer(RName);
}
function MoveLeftLayer(LName) {
var x = 5;
var y = 165;
LeftName=LName;
eval("var diff = (document.body.scrollTop + y - document.all." + LeftName + ".style.posTop)*.40");
var y = document.body.scrollTop + y - diff;
eval("document.all." + LeftName + ".style.posTop = y");
eval("document.all." + LeftName + ".style.posLeft = x");
setTimeout("MoveLeftLayer(LeftName);", 20);
}
function MoveRightLayer(RName) {
var x = 5;
var y = 165;
RightName=RName;
eval("var diff = (document.body.scrollTop + y - document.all." + RightName + ".style.posTop)*.40");
var y = document.body.scrollTop + y - diff;
eval("document.all." + RightName + ".style.posTop = y");
eval("document.all." + RightName + ".style.posRight = x");
setTimeout("MoveRightLayer(RightName);", 20);
}
document.write("<span id=NowAd_left><a href='http://pcqc.86516.com' target='_blank'><img src='http://pcqc.86516.com/huodong/0718/zijia.gif' WIDTH=100 HEIGHT=250 border=0></img></a></span>"
+"<span id=NowAd_right><a href='http://pcqc.86516.com' target='blank'><img src='http://www.91linux.com/huodong/0718/zijia.gif' WIDTH=100 HEIGHT=250 border=0></img></a></span>");
initEcAd("NowAd_left","NowAd_right")</SCRIPT>
 

Tags:代码 广告
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明