This article mainly brings you a method to quickly obtain Ajax communication objects. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look, I hope it can help everyone.
Examples are as follows:
##
function getXHR() { // 该方法用于获取Ajax通信对象 var xhr = null; if (window.XMLHttpRequest != null && window.XMLHttpRequest != undefined) { xhr = new XMLHttpRequest(); } else { / 兼容早期的IE浏览器 xhr = new ActiveXObject("Microsoft.XMLHTTP"); } return xhr; }
Detailed explanation of the example of django getting ajax post complex object
The problem of crawler getting AJax data
Jquery and JS use external variables to get the data returned by Ajax Method example of parameter value (super simple)_javascript skills
The above is the detailed content of Detailed example of quickly obtaining Ajax communication objects. For more information, please follow other related articles on the PHP Chinese website!