HTML Dom tutorials-browser objects

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.