Home >Web Front-end >JS Tutorial >Advertising code on the left and right sides Simple_advertising code

Advertising code on the left and right sides Simple_advertising code

WBOY
WBOYOriginal
2016-05-16 19:28:381573browse

[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]<script>function initEcAd(LName,RName) { document.all.NowAd_left.style.posTop = -200; document.all.NowAd_left.style.visibility = 'visible'; document.all.NowAd_left.style.position = 'absolute'; document.all.NowAd_right.style.posTop = -200; document.all.NowAd_right.style.visibility = 'visible'; document.all.NowAd_right.style.position = 'absolute'; MoveLeftLayer(LName); MoveRightLayer(RName); } function MoveLeftLayer(LName) { var x = 5; var y = 165; LeftName=LName; eval("var diff = (document.body.scrollTop + y - document.all." + LeftName + ".style.posTop)*.40"); var y = document.body.scrollTop + y - diff; eval("document.all." + LeftName + ".style.posTop = y"); eval("document.all." + LeftName + ".style.posLeft = x"); setTimeout("MoveLeftLayer(LeftName);", 20); } function MoveRightLayer(RName) { var x = 5; var y = 165; RightName=RName; eval("var diff = (document.body.scrollTop + y - document.all." + RightName + ".style.posTop)*.40"); var y = document.body.scrollTop + y - diff; eval("document.all." + RightName + ".style.posTop = y"); eval("document.all." + RightName + ".style.posRight = x"); setTimeout("MoveRightLayer(RightName);", 20); } document.write("<span id=NowAd_left><a href='http://pcqc.86516.com' target='_blank'><img src='http://pcqc.86516.com/huodong/0718/zijia.gif' WIDTH=100 HEIGHT=250 border=0 alt="Advertising code on the left and right sides Simple_advertising code" >" +"<span id=NowAd_right><a href='http://pcqc.86516.com' target='blank'><img src='http://pcqc.86516.com/huodong/0718/zijia.gif' WIDTH=100 HEIGHT=250 border=0 alt="Advertising code on the left and right sides Simple_advertising code" >"); initEcAd("NowAd_left","NowAd_right")</script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn