Carousel Ads
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" ><html><head><meta http-equiv="Content-type" Content="text/html; Charset=utf-8 "><title>Carousel Ads</title><style type="Text/css"> . Hide{ display: none; } #div1{ position: absolute; top:px; Left : +px; } #div2{ position: absolute; top:155px; Left :435px; } a{ Display:block ; float: Left; width: +px ; height: px ; text-decoration: None ; background-color: #fff ; color:#000 ; margin-right: 3px ; text-align: Center ; Border: 1px solid #999 ; font-size:px ;}</style><script type="Text/javascript"> varmax=4;varnow=1;varTimer Window.onload=show; function show(id){ if( Number(ID)) {now=id; Cleartimeout (timer);//Clear the original timer} for(varI=1; i<=max;i++) {if(I==now) {document.getElementById ("ADV"+now). style.display="Block";//show current picture}Else{document.getElementById ("ADV"+i). style.display="None"; } }if(Now==max) {now=1; }Else{now++; } timer=settimeout ("Show ()", -);//Create timer, two seconds to execute}</script></head><body> <div id="Div1"> <img src="Images/class1-1.jpg" id="Adv1" /> <img src="Images/class1-2.jpg" id="Adv2" class ="Hide"/> <img src="Images/class1-3.jpg" id="Adv3 " Class="Hide"/> <img src="Images/class1-4.jpg" id= "adv4" class=" Hide "/> </div> <div id="Div2"> <a href="javascript:show (1)">1</a> <a href="Javascript:show (2)">2</a> <a href="Javascript:show (3)">3</a> <a href="Javascript:show (4)">4</a> </div></body></html>
JavaScript-Carousel AD Instance