Detect the browser version in Javascript

<HTML>
<HEAD>
<TITLE>Browser Detecti on</TITLE>
</HEAD>
<body>
<SCRIPT LANGUAGE="JavaScript">
var browsername= navigator.appName
var browserversion = navigator.appVersion
if (browsername == "Microsoft Internet Explorer" )
{ 
document. write(" You are using MS Internet Explorer version " +
browserversion)
}
else
{ 
document. write(" You are using Netscape Navigator version " +
browserversion)
}
</SCRIPT>
</BODY>
</HTML>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.