SIGN UP MEMBER LOGIN:    
Blog

Browser Detection In JavaScript

Posted by Mahak Gupta Blogs | ASP, JavaScript, CSS Jan 23, 2012
We can Detect the visitor's browser with the help of Navigator Object In JavaScript.
We can Detect the visitor's browser with the help of Navigator Object In JavaScript.

Ex:


<html>
<body>
<div id="browserdetection"></div>

<script type="text/javascript">

x = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
x+= "<p>Browser Name: " + navigator.appName + "</p>";
x+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
x+= "<p>Browser Version: " + navigator.appVersion + "</p>";

document.getElementById("browserdetection").innerHTML=x;

</script>

</body>
</html>


Output:

juhi.png

share this blog :
post comment