così dovrebbe andarecodice:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" language="javascript"> <!-- function loadpage() { browver= parseInt(navigator.appVersion); browtype = navigator.appName; browsertype = "old"; if (browtype == "Netscape" && !(browver < 3)) { browsertype = "new"; } if (browtype == "Microsoft Internet Explorer" && !(browver < 4)) { browsertype = "new"; } if (browsertype == "new") { thetimer = setTimeout("changeimage()", 3000); thetimer2 = setTimeout("changeimage2()", 3000); banneradcode = 0; bannercode2=0; listofimages = new Array(3); listofimages[0] = new Image(468,60) listofimages[0].src = "banner-0.gif" listofimages[1] = new Image(468,60) listofimages[1].src = "banner-1.gif" listofimages[2] = new Image(468,60) listofimages[2].src = "banner-2.gif" listofimages2 = new Array(3); listofimages2[0] = new Image(468,60) listofimages2[0].src = "banner2-0.gif" listofimages2[1] = new Image(468,60) listofimages2[1].src = "banner2-1.gif" listofimages2[2] = new Image(468,60) listofimages2[2].src = "banner2-2.gif" } } function changeimage(){ if (browsertype == "new") { banneradcode = banneradcode + 1 if (banneradcode == "3") { banneradcode = 0 } imagesource = "banner-" + banneradcode + ".gif" window.document.bannerad.src = imagesource thetimer = setTimeout("changeimage()", 5000); } else if (browsertype == "old") { } } function changeimage2(){ if (browsertype == "new") { banneradcode2 = banneradcode2 + 1 if (banneradcode2 == "3") { banneradcode2 = 0 } imagesource = "banner-" + banneradcode2 + ".gif" window.document.bannerad2.src = imagesource thetimer = setTimeout("changeimage()", 5000); } else if (browsertype == "old") { } } function changepage() { if (browsertype == "new") { if (banneradcode == 0) { newlocation = "http://www.html.it" } else if (banneradcode == 1) { newlocation = "http://www.html.it" } else if (banneradcode == 2) { newlocation = "http://www.html.it" } location = newlocation } else if (browsertype == "old") { location = "http://www.html.it" } } function changepage2() { if (browsertype == "new") { if (banneradcode2 == 0) { newlocation = "http://www.html.it" } else if (banneradcode2 == 1) { newlocation = "http://www.html.it" } else if (banneradcode2 == 2) { newlocation = "http://www.html.it" } location = newlocation } else if (browsertype == "old") { location = "http://www.html.it" } } // --></script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento senza titolo</title> </head> <body bgcolor="white" vlink="blue" link="blue" onload="loadpage()"> <a href="java-script:changepage()"> [img]banner-0.gif[/img] </a> <a href="java-script:changepage2()"> [img]banner2-0.gif[/img] </a> </body> </html>![]()

Rispondi quotando