200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > ajax不错的应用

ajax不错的应用

时间:2023-05-29 18:57:14

相关推荐

ajax不错的应用

今天小编给大家介绍下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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。