Javascript Tutorial

Browser Detection code

txt = "

Browser CodeName: " + navigator.appCodeName + "

";
txt+= "

Browser Name: " + navigator.appName + "

";
txt+= "

Browser Version: " + navigator.appVersion + "

";
txt+= "

Cookies Enabled: " + navigator.cookieEnabled + "

";
txt+= "

Platform: " + navigator.platform + "

";
txt+= "

User-agent header: " + navigator.userAgent + "

";

document.getElementById("example").innerHTML=txt;