返回首页
当前位置: 主页 > 网络编程 > Asp实例教程 >

asp浮动广告代码大全

时间:2010-05-14 22:29来源:知行网www.zhixing123.cn 编辑:麦田守望者

<SCRIPT LANGUAGE="JavaScript">
<!--
//more javascript from -->
function initEcAd() {
document.all.AdLayer1.style.posTop = -5;
document.all.AdLayer1.style.visibility = 'visible';
document.all.AdLayer2.style.posTop = -5;
document.all.AdLayer2.style.visibility = 'visible';
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
function MoveLeftLayer(layerName) {
var x = 5;
var y = 10;
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 = 10;
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'><p align='center'><a href='javascript:' onClick=AdLayer1.style.visibility='hidden'; AdLayer1.style.visibility='hidden' class=a2>关 闭<br></a><a href='zhuanti/zhuanti_7lh.asp' target=_blank> <img src=image/duilian4-29.gif border=0><br><br>"
+"<a href='zhuanti/zhuanti_7dc.asp' target=_blank> <img src=image/duilian5-21.gif border=0></a>"
  + "</div>"
  +"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><p align='center'><a href='javascript:' onClick=AdLayer2.style.visibility='hidden'; AdLayer2.style.visibility='hidden' class=a2>关 闭<br></a><a href='zhuanti/zhuanti_7lh.asp' target=_blank> <img src=image/duilian4-29.gif border=0></a><br><br>"
  +"<a href='zhuanti/zhuanti_7dc.asp' target=_blank> <img src=image/duilian5-21.gif border=0></a>"
  + "</div>");
initEcAd();
</SCRIPT>

<CENTER>
 

------分隔线----------------------------
标签(Tag):asp代码 asp实例
------分隔线----------------------------
推荐内容
猜你感兴趣