今天小编给大家介绍下ajax不错的应用,平时喜欢ajax不错的应用的朋友赶紧收藏起来吧!记得点赞哦~
script type="text/javascript" language="javascript"
var http_request = false;
function makeRequest(url) {
http_request = false;
if () { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if () {
( ext/xml);
}
} else if () { // IE
try {
http_request = new ActiveXObject("");
} catch (e) {
try {
http_request = new ActiveXObject("");
} catch (e) {}
}
}
if (!http_request) {
alert(Giving up :( Cannot create an XMLHTTP instance);
return false;
}
= alertContents;
(GET, url, true);
();
}
function alertContents() {
if ( == 4) {
if ( == 200) {
alert();
} else {
alert(There was a problem with the request.);
}
}
}
/script
span
)"
Make a request
/span