Tryit Editor v1.4

<html> <body> <script type="text/javascript"> image0="../banners/w3schools.gif"; href0="../default.asp.htm"; alt0="w3schools.com"; image1="../banners/rd_htmlref.jpg"; href1="../html/html_reference.asp.htm"; alt1="HTML Reference"; image2="../banners/rd_xhtml.jpg"; href2="../xhtml/default.asp.htm"; alt2="ASP Free"; len=3; now=new Date(); now=now.getSeconds(); rnd=now%len; image=eval("image"+rnd); href=eval("href"+rnd); alt=eval("alt"+rnd); document.write("<a href='" + href + "'>"); document.write("<img src='" + image + "' alt='" + alt + "'></a>"); </script> <h3>Refresh this page to see the banner change</h3> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself