网页对联广告(2)

把下面的作成 ad.js 文件
[code]function initEcAd() {
document.all.AdLayer1.style.posTop = -100;
document.all.AdLayer1.style.visibility = ‘visible’
document.all.AdLayer2.style.posTop = -100;
document.all.AdLayer2.style.visibility = ‘visible’
MoveLeftLayer(‘AdLayer1’);
MoveRightLayer(‘AdLayer2’);
}
function MoveLeftLayer(layerName) {
var x = 7;
var y = 290;
var diff = (document.body.scrollTop + y – document.all.AdLayer1.style.posTop)*.40;
var y = document.body.scrollTop + y – diff;
eval(“document.all.” + layerName + “.style.posTop = y”);
eval(“document.all.” + layerName + “.style.posLeft = x”);
}
function MoveRightLayer(layerName) {
var x = 7;
var y = 290;
var diff = (document.body.scrollTop + y – document.all.AdLayer2.style.posTop)*.40;
var y = document.body.scrollTop + y – diff;
eval(“document.all.” + layerName + “.style.posTop = y”);
eval(“document.all.” + layerName + “.style.posRight = x”);
}
document.write(“


+”

“);
initEcAd()
[/code]
在要用的页加
[code]

在flash 的按纽里加入
on(release)
{
fscommand(“quit”);
}
[/code]
就好了,我自己用过了,呵呵,感觉不错哦!

未经允许不得转载:Windy's Blog » 网页对联广告(2)

赞 (0)