JavaScript Browser Info
// JavaScript Document// Example:
// var b = new BrowserInfo();
// alert(b.version);
function BrowserInfo(){
this.name = navigator.appName;
this.codename = navigator.appCodeName;
this.version = navigator.appVersion.substring(0, 4);
this.platform = navigator.platform;
this.javaEnabled = navigator.javaEnabled();
this.screenWidth = screen.width;
this.screenHeight = screen.height;
alert(this.name);
}
function platformDetect(){
if(navigator.appVersion.indexOf("Win") != -1){
alert("Windows");
}
else if(navigator.appVersion.indexOf("Mac") != -1){
alert("Macintosh");
}
else alert("Other");
}