Now, the attributes and methods of browser objects are almost the same. You can test your browser according to the Demo below to see the details of your browser.
Today, we continue to introduce the browser (Navigator) object with the last window object. Navigator mainly returns some information about the browser. Next let's take a look at its attributes and methods, and finally give a Demo.
Navigator Object Attributes
AppCodeName: return the code name of the browser.
AppName: returns the browser name.
AppVersion: returns the platform and version information of the browser.
AppMinorVersion: returns the secondary version of the browser.
BrowserLanguage: returns the language of the current browser.
CookieEnabled: returns whether the browser enables cookies. The result is a Boolean value.
OnLine: returns whether the browser is in offline mode and returns a Boolean value.
CpuClass: returns the CPU level of the browser system.
Platform: returns the operating system platform that runs the browser.
SystemLanguage: the language used by the operating system.
UserLanguage: returns the natural language settings of the operating system.
UserAgent: return the user-agent header value sent from the client to the server.
Browser support for these attributes
Attribute |
Description |
IE |
F |
O |
AppCodeName |
Return the code name of the browser. |
4 |
1 |
9 |
AppMinorVersion |
Returns the secondary version of the browser. |
4 |
No |
No |
AppName |
Returns the name of the browser. |
4 |
1 |
9 |
AppVersion |
Return the platform and version information of the browser. |
4 |
1 |
9 |
BrowserLanguage |
Returns the language of the current browser. |
4 |
No |
9 |
CookieEnabled |
Returns a Boolean value indicating whether the cookie is enabled in the browser. |
4 |
1 |
9 |
CpuClass |
Returns the CPU level of the browser system. |
4 |
No |
No |
OnLine |
Returns a Boolean value indicating whether the system is in offline mode. |
4 |
No |
No |
Platform |
Return to the operating system platform that runs the browser. |
4 |
1 |
9 |
SystemLanguage |
Returns the default OS language. |
4 |
No |
No |
UserAgent |
Returns the value of the user-agent header of the server sent by the client. |
4 |
1 |
9 |
UserLanguage |
Returns the OS's natural language settings. |
4 |
No |
9 |
Navigator Object Method
JavaEnabled () method: determines whether the browser supports and enables Java. The result is a Boolean value.
TaintEnabled () method: checks whether the browser enables data tainting and returns a Boolean value.
1234567891011121314151617181920 |
|