欢迎光临

木子屋

标题: 对联广告代码

作者: admin

日期: 2006-07-19 09:25 AM

分类: 脚本语言

内容: 复制内容到剪贴板 程序代码function initEcAd() {
document.all.divLeft.style.posTop = -200;
document.all.divLeft.style.visibility = 'visible'
document.all.divRight.style.posTop = -200;
document.all.divRight.style.visibility = 'visible'
MoveLeftLayer('divLeft',50);
MoveRightLayer('divRight',50);
}
function MoveLeftLayer(layerName,y_obj) {
var x = 20;
var y = y_obj;// 左侧广告距离页首高度
var diff = (document.body.scrollTop + y - eval("document.all."+layerName+".style.posTop"))*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('"+layerName+"',"+y_obj+");", 20);
}
function MoveRightLayer(layerName,y_obj) {
var x = 20;
var y = y_obj;// 右侧广告距离页首高度
var diff = (document.body.scrollTop + y - eval("document.all."+layerName+".style.posTop"))*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = parseInt(y)");
eval("document.all." + layerName + ".style.posRight = x");
setTimeout("MoveRightLayer('"+layerName+"',"+y_obj+");", 20);
}
var adLeftHtml ="<iframe style='WIDTH: 170px; HEIGHT: 300px' id='a' frameBorder='no' scrolling='no' src='http://www.mzwu.com/' align='top'></iframe>";
var adRightHtml = "<iframe style='WIDTH: 170px; HEIGHT: 300px' id='aa' frameBorder='no' scrolling='no' src='http://www.mzwu.com/' align='top'></iframe>";
var divLeft = "<div id='divLeft' style='position: absolute;visibility:hidden;z-index:1'>"+adLeftHtml+"</div>";
var divRight = "<div id='divRight' style='position: absolute;visibility:hidden;z-index:1'>"+adRightHtml+"</div>";
document.write(divLeft + divRight);
initEcAd()

+ 查看当前日志评论 (1)

登录

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.504 ms

返回

标题: 对联广告代码

你没有权限发表评论

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.504 ms

返回

暂无评论

返回

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 0.551 ms

返回