A piece of XMLHttpRequest code written by foreigners. multiple browsers support compatibility. Over the past few days, we have to use Javascript to call Asp. net WebService, which needs to be supported by XMLHTTP, but it was found that the XMLHttpRequest of Opera is very bad and cannot be supported. Later, I searched for it everywhere and finally found that the c
Request|xml|xmlhttprequest| Browser
These days to conceive of using JavaScript call asp.net webservice, need to XMLHTTP to support, but found that opera XMLHttpRequest very rotten, really support not go on, and then find everywhere, finally found this code, in opera is the u
multiple browsers:
Method 1:
Var xmlhttp = false;// Create a new variable and assign a value of false. If false is used as the judgment condition, the XMLHTTPRequest object has not been created.
Function CreateXMLHttp (){
Try {
Xmlhttp = new XMLHttpRequest ();//Try to create the XMLHttpRequest object. all browsers except IE
multiple browsers:The first method:var xmlhttp=false;//creates a new variable and assigns a value of false, using false as a condition to tell that the XMLHttpRequest object has not been createdfunction Createxmlhttp () {try{xmlhttp=new XMLHttpRequest ();//try to create a XMLHttpRequest object, which is supported by browsers other than IE. }catch (e) {try{xmlhtt
function Createxhr () {var xhr = null;if (window. XMLHttpRequest) {//Determine if the current browser supports XMLHttpRequestXHR = new XMLHttpRequest ();}else if (window. XMLHttpRequest) {//Determine if the current browser supports XMLHt
(xmlhttp_arr[i ))
break;
}
return XMLHTTP;
}
}
This is a browser other than IE to create a XMLHttpRequest object
var xmlhttp=new xmlhttprequest ();
After you create the XMLHTTP, then look at some of its properties and methods, and the most important onreadystatechange event handle
Method:
Open () initializes HTTP request parameters, including URL
Note: The version of Firefox 3.5, Chrome 3.0, and Safari 4 is not a problem with XMLHttpRequest.
ie7+ Browser has started to support XMLHttpRequest objects, when using XMLHttpRequest to request files of different sources (pages of different domain names), and whether the
Document directory
Load XML files
Load XML strings
Selectnodes (), selectsinglenode () method
XML attributes
Obtain the XMLHTTPRequest object in IE and other browsers.
Description of open method parameters
Set the default value of the send method parameter
XML document processing and loading XML files
IE:
Xmldoc = new activexobject ("Microsoft. xmldom ");
Xmldoc. async = "false ";
Xmldoc. Load ("books. xml ");
Other browsers:
Xmldoc = Documen
When a PHP website is accessed using an android browser, the readyState of some XMLHttpRequest images uploaded is always at 1, and the same program is on the mobile phone (and PC) chrome and Apple mobile browsers are all normal, and only Android browsers cannot be completed... when a PHP website is accessed using an android browser, the readyState of some
PHP Web site on the Android phone browser access, upload pictures of the part of the XMLHttpRequest readystate always remain at 1, the same program in the mobile phone (and PC side) Chrome browser and Apple phone browser are all normal, Only Andro browser can not complete th
Two days ago encountered a problem, easyui the DataGrid sent to the background to send a request for local testing no problem, put the server under the Google no problem, the request sent under IE failed. Open Browser Console to view request failed, console error script7002:xmlhttprequest: Network error 0x2ef3,network service is suspended:Page Popup error message box:Troubleshooting: By Google under the req
Asynchronous requests can be implemented using XMLHttpRequest Browser objects (IE5, ActiveXObject objects in IE6), and Ajax is the encapsulation that is based on this.1, synchronous and asynchronous: use: 2. Get and Post:Get: parameter in URL, send () parameter is emptyif(Isasyn) {//AsynchronousXmlhttp.open ("GET", URL,true); Xmlhttp.send ();} Else{//SynchronousXmlhttp.open ("GET", URL,false); Xmlhttp.se
Browser Integration Teaching-add macro support to browser programs
This tutorial provides a method to add macro support to a browser program. You will see how to add macro support to the MFC program. This article also discusses ho
1,jquery or JS to determine the browser kernel version number and whether to support the box model JQuery, starting with version 1.9, removed $.browser and $.browser.version and replaced it with $.support. In the updated version 2.0, IE 6/7/8 will no longer be supported.Later, if the user needs to
Thunder browser support where? The following small set for everyone to bring the Thunder browser associated with the use of the tutorial, Thunder Browser support, can be convenient for us to download resources, the following and small set together to see the tutorial.
Thund
Browser plugin based on Firebreath developed for multi-browser support under MacThe first thing to distinguish between browser extension and browser plug-ins, plug-ins can do as much as local programsI. About Firebreathhttp://www.firebreath.orgFirebreath is a boast platform,
Contenteditable attribute (basic support)
-Working Draft
Global user stats *:
Support:
86.71%
Partial support:
0.32%
Total:
87.03%
Method of making any HTML element editable
Resources:
Demo page
WHATWG blog post
Blog post on usage problems
IE
Firefox
Chrome
Safari
JQuery, starting with version 1.9, removed $.browser and $.browser.version and replaced it with $.support. In the updated version 2.0, IE 6/7/8 will no longer be supported. Later, if the user needs to support IE 6/7/8, only jQuery 1.9 can be used. If you want to fully support IE, and mix with JQuery 1.9 and 2.0, the of
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.