首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

页面两端像对联同样的广告的实现

2012-10-28 
页面两端像对联一样的广告的实现!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//ENHTML?

页面两端像对联一样的广告的实现

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
?<HEAD>
? <TITLE> 页面两端像对联一样的广告的实现 </TITLE>
? <META NAME="Generator" CONTENT="EditPlus">
? <META NAME="Author" CONTENT="">
? <META NAME="Keywords" CONTENT="">
? <META NAME="Description" CONTENT="">
?</HEAD>

?<BODY>
? <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 = 340;
??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 = 340;
??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='_blank'>"+
??????"<img src='要挂上去的图片广告'? width='150' height='300'>"+
??????"</a>"+
??????"</div>"+
??????"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'>"+
??????"<a href='#' target='_blank'>"+
??????"<img src='要挂上去的图片广告' width='150' height='300'>"+
??????"</a>"+
??????"</div>");
??initEcAd()
??//-->
?</SCRIPT>
?</BODY>
</HTML>

热点排行