|
|
Javascript: Browser Detection Script - Detect your visitors browser | ||
Discussion by cherri with 2 Replies.
Last Update: February 6, 2009, 7:08 am | |||
If you want to detect your visitors browser, sebd them a message and redirect them use this script:
<script language="JavaScript">
<!--
var browserName=navigator.appName;
if (browserName=="Netscape")
{
alert("Hi Netscape user!")
window.location = "netscape.html"
}
else
{
if (browserName=="Microsoft Internet Explorer")
{
alert("Hi Microsoft Internet Exlorer User!");
window.location = "MIE.html"
}
else
{
alert("What are you browsing with?");
window.location = "unkown.html"
}
}
//-->
</SCRIPT>
CODE
<script language="JavaScript">
<!--
var browserName=navigator.appName;
if (browserName=="Netscape")
{
alert("Hi Netscape user!")
window.location = "netscape.html"
}
else
{
if (browserName=="Microsoft Internet Explorer")
{
alert("Hi Microsoft Internet Exlorer User!");
window.location = "MIE.html"
}
else
{
alert("What are you browsing with?");
window.location = "unkown.html"
}
}
//-->
</SCRIPT>
Sat Apr 22, 2006 Reply New Discussion
Browser detectionJavascript: Browser Detection Script
Kindly please make a script that can detect my browser.Example:
- If my browser is IE 6 and below it will display ie6.Html
- Else if my browser is IE 7 and above it will display ie7.Html
- Else my browser is not IE then it will display a message like you are not using IE Browser.
Sun Dec 21, 2008 Reply New Discussion
Where can we find the most comprehensive Java tutorial online? I always waned to self study java. Where shall I start about Java? What basic things I should know before I proceed with Java?
Fri Feb 6, 2009 Reply New Discussion
JavaScript: A Welcome To Visitors Script give your visitor a warm welcome (8)
|
(13) JavaScript: Hide And Show Any Element With CSS From the simple way to the more advanced wa...
|
Index




