JS differences in "JS" IE, FF, Chrome browser

Source: Internet
Author: User

How to tell the browser type

Ext.: http://www.cnblogs.com/carekee/articles/1854674.html

1. getboxobjectfor Opera's Window.opera Safari's opendatabase chrom via browser-specific objects such as IE's ActiveXObject ff What's interesting about e Messageevent is that Chrome's useragent also includes Safari features, which is perhaps the basis for Chrome to run all Apple browser apps .

2. Use the Agent keyword combined version to determine

Introduction to JS differences in IE, FF, Chrome browser

Ext.: http://www.jb51.net/article/40533.htm

Get elements, Ajax requests, alpha IE with filter 、。。。 Look at the original.

Ajax Principles

This is a very good little story http://www.cnblogs.com/mingmingruyuedlut/archive/2011/10/18/2216553.html

Focus on the object that returns the result:

First, let's take a look at the properties of the XMLHttpRequest object.

Its properties are:

onReadyStateChange event handlers for events that are triggered by each state change.

ResponseText the string form of the data returned from the server process.

Responsexml a DOM-compatible document data object that is returned from the server process.

Status number codes returned from the server, such as common 404 (not Found) and 200 (ready)

Status Text string information accompanying the state code

ReadyState Object State Value

0 (uninitialized) object has been established but not initialized (the open method has not been called)

1 (Initialize) object has been established, the Send method has not been called

2 (send data) The Send method has been called, but the current state and HTTP headers are unknown

3 (data transfer) has received some of the data, because the response and HTTP header is not complete, then through Responsebody and ResponseText to obtain some of the data will be error,

4 (complete) The data is received, at which time the complete response data can be obtained by Responsexml and ResponseText

JS differences in "JS" IE, FF, Chrome browser

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.