<script type="text/javascript">
alert(navigator);
var browserName=navigator.appName;
var userAgent = navigator.userAgent
alert(browserName);
if (browserName=="Microsoft Internet Explorer"){
alert("Microsoft Internet Explorer");
alert("Microsoft Internet Explorer Version : "+navigator.appVersion);
alert(document.documentMode;);
}
else if (browserName=="Netscape" && userAgent.indexOf("Chrome") != -1 ){
alert("Google Chrome");
alert("Google Chrome Version: "+navigator.appVersion);
}
else if(browserName=="Netscape" && userAgent.indexOf("Mozilla") != -1){
alert("Mozilla Firefox");
alert("Mozilla Firefox Version : "+navigator.appVersion);
}else{
alert("Another browser");
}
</script>
Sunday, August 14, 2011
Browser name and version in javascript
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Please comment on this