Version 1 Results | Version 2 | Version 3 | Version 4
SCRIPT
var bName = navigator.appName; var bVer = parseInt(navigator.appVersion); var IE = "Microsoft Internet Explorer"; var br; // "n3" is short for Netscape 3.x or greater or JavaScript 1.1 or greater if ((bName == "Netscape" && bVer >= 3) || (bName == IE && bVer >= 4)) br = "n3"; else br = "n2"; /* bName (browser Name) & bVer (browser Version) gives us enough information to decide
what the browsers are capable of based on the information we just gathered. */ if (br == "n3") { // this should look a lot like document.images for example var displayOn = new Image(); displayOn.src = "images/displayOn.gif"; } document.write("Browser Name is " + bName + "
"); document.write("Browser Version is " + navigator.appVersion + ""); document.write("var bName is " + bName + "
"); document.write("var bVer is " + bVer + "");