var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
var URL = "Web.asmx/HelloWorld";
xmlhttp.Open("Post", URL, false);
//false来表示异常,true表示同步
xmlhttp.send(null);
var result = xmlhttp.status;
var x = xmlhttp.responseXML;
$.tips(result);
if (result == 200) {
$.tips(x.childNodes[1].text);
if (x.childNodes[1].text == "True") {
什么也不做,继续下面的验证
$.tips("True");
}
else {
$.error(content, "系统提示!");
return;
}
}
else {
$.error("请求错误:" + result, "系统提示");
}
xmlhttp = null;
原文:http://blog.csdn.net/yaerfeng/article/details/18728455