· The javascript navigator object contains all information about the visitor’s browser.
Ø navigator object property
Property | Description |
appName | Name of the browser. |
appCodeName | Which is used to get the code name of the browser. |
appVersion | Version of the browser |
Platform | Operating system being used |
userAgent | Name of the user agent |
Example
<html>
<head>
<script language="javascript">
var x = navigator
document.write("Name :- "+x.appName+"<br/>");
document.write("Code Name :- "+ x.appCodeName + "<br/>" );
document.write("Version :- "+x.appVersion+"<br/>");
document.write("Platform :- "+x.platform+"<br/>");
document.write("User Agent :- "+x.userAgent);
</script>
</head>
</html>
output
Name :- Netscape
Code Name :- Mozilla
Version :- 5.0 (Windows; en-US)
Platform :- Win32
User Agent :- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729)
Posted By : Hemangi Zala
No comments:
Post a Comment