JavaScript Source Code 3000: User Details: Browser & Version Redirect
Browser & Version Redirect
If you maintain separate pages for Netscape and Internet Explorer browsers and want to additionally divide each browser's page into version pages, this script is for you. The script will create a link (or can be changed to automatically redirect) to browser[version number].html. (For example, a visitor with Netscape 4.5 would see a link to netscape4.html)
JavaScript Source Code 3000: User Details: Browser & Version Redirect
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!
<!-- ONE STEP TO INSTALL BROWSER & VERSION REDIRECT:
1. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the BODY of your HTML document -->
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<! >
<! >
<!-- Begin
var name = navigator.appName;
var vers = navigator.appVersion;
vers = vers.substring(0,1); // or 0,4 could return 4.5 instead of just 4
if (name == "Microsoft Internet Explorer")
url="msie";
else
url="netscape";
url += vers + ".html";
document.write('<center>');
document.write('<A HREF="' + url + '">Enter</A>');
document.write('</center>');
// You may make the redirection automatic by using this
// window.location=url;
// instead of the three document.write lines above
// End -->
</script>
<!-- Script Size: 1.08 KB -->
Wyszukiwarka
Podobne podstrony:
browser versionBrowser Detection and RedirectHaiducii Dragostea Din Tei Italian Versionversion1 (2)browser detailsbrowse article view (2)browse mapAge of Numenor PBEM version 0 2 Creditsversion history (2)pete ogl?d version 1ufunction zend versionbrowser infobrowse archivebrowsewięcej podobnych podstron