两侧随滚动条滚动的广告条
一些网站两侧随滚动条滚动的广告条怎么做的啊?是两侧的哦,不是一侧的~这里要用到两个层的,一边一个。高手高诉我代码,谢谢!~...
一些网站两侧随滚动条滚动的广告条怎么做的啊?是两侧的哦,不是一侧的~这里要用到两个层的,一边一个。
高手高诉我代码,谢谢!~ 展开
高手高诉我代码,谢谢!~ 展开
1个回答
展开全部
<SCRIPT LANGUAGE="JavaScript">
function initEcAd() {
document.all.AdLayer1.style.posTop = -200;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = -200;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
function MoveLeftLayer(layerName) {
var x = 5;
var y = 400;
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 = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = 5;
var y = 400;
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");
setTimeout("MoveRightLayer('AdLayer2');", 20);
}
document.write("<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1'><a href=地址 target=_bank><img src=图片地址 width=100 height=150 border=0></a></div>"
+"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><a href=地址 target=_bank><img src=图片地址 width=100 height=150 border=0></a></div>");
initEcAd()
//
</SCRIPT>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
function initEcAd() {
document.all.AdLayer1.style.posTop = -200;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = -200;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
function MoveLeftLayer(layerName) {
var x = 5;
var y = 400;
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 = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = 5;
var y = 400;
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");
setTimeout("MoveRightLayer('AdLayer2');", 20);
}
document.write("<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1'><a href=地址 target=_bank><img src=图片地址 width=100 height=150 border=0></a></div>"
+"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><a href=地址 target=_bank><img src=图片地址 width=100 height=150 border=0></a></div>");
initEcAd()
//
</SCRIPT>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
<br>1<br>2<br>3<br><br><br><br><br><br><br><br><br><br><br><br><br><br>d<br>
传播易
2024-12-30 广告
2024-12-30 广告
点亮城市夜空,聚焦您的品牌光芒厦门地标之上,巨幅LED大屏璀璨夺目!携手有咖科技,让每一帧画面成为不可忽视的视觉盛宴。精准触达海量人流,深度传播品牌形象。创意内容,高效吸引眼球,无论是新品发布还是节日庆典,我们助力您的信息跨越时空界限,瞬间...
点击进入详情页
本回答由传播易提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询