Javascript: navigator object

Source: Internet
Author: User
Check the browser version, supported MIME types, and installed plug-ins (plug-in ). This object contains two sub-objects: a plug-in object and a mime-type object.

Attributes of the navigator object:

Format: navigator. Attribute
Appcodename code
Appname
Appversion
Language
Mimetype indicates the supported MIME type in array
Machine Type of the browser for compiling Platform
Plug-ins use arrays to indicate installed plug-ins
Useragent User Agent header

 

Example 1:
<SCRIPT>

With (document ){
Write ("your browser information: <ol> ");
Write ("<li> Code:" + navigator. appcodename );
Write ("<li> name:" + navigator. appname );
Write ("<li> Version:" + navigator. appversion );
Write ("<li> language:" + navigator. Language );
Write ("<li> compilation platform:" + navigator. Platform );
Write ("<li> User header:" + navigator. useragent );
}

</SCRIPT>

Example 2:
<SCRIPT>

If (document. All ){
Document. Write ("your browser is: MSIE ");
} Else {
Document. Write ("your browser is: Navigator ");
}

</SCRIPT>


Related Article

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.