Property | Description |
---|---|
appName | Returns the code name of the browser. |
appCodeName | Returns the name of the browser |
appvVersion | Returns the version of the browser being used |
cookieEnabled | Returns whether the cookies are enabled or not in the browser |
language | Returns the language. It is supported in Netscape and Firefox only. |
onLine | Returns true if browser is online otherwise false. |
plugins | Returns the plugins. It is supported in Netscape and Firefox only. |
platform | Returns the platform e.g. Win32. |
systemLanguage | Returns the system language. It is supported in IE only. |
userAgent | Returns the user agent |
<html>
<head>
<title>JavaScript Navigator Object</title>
</head>
<body>
<script type="text/javascript">
document.writeln("navigator.appName: "+navigator.appName + "<br/><br/>");
document.writeln("navigator.appCodeName: "+navigator.appCodeName + "<br/><br/>");
document.writeln("navigator.appVersion: "+navigator.appVersion + "<br/><br/>");
document.writeln("navigator.cookieEnabled: "+navigator.cookieEnabled + "<br/><br/>");
document.writeln("navigator.language: "+navigator.language + "<br/><br/>");
document.writeln("<br/>navigator.onLine: "+navigator.onLine + "<br/><br/>");
document.writeln("<br/>navigator.platform: "+navigator.platform + "<br/><br/>");
document.writeln("<br/>navigator.userAgent: "+navigator.userAgent);
</script>
</body>
</html>
Method | Description |
---|---|
javaEnabled() | Whether Java is enabled or not. |
taintEnabled() | Whether data tainting is enabled or not. |
<html>
<head>
<title>JavaScript Navigator Object Methods</title>
</head>
<body>
<script type="text/javascript">
document.write("<strong>Java enabled : </strong>" + navigator.javaEnabled() + "<br/><br/>");
document.write("<strong>Data tainting enabled: </strong>" + navigator.taintEnabled());
</script>
</body>
</html>