标签:
1. ajax_func.js的代码如下 :
2. 回调函数举例
1)处理返回文本格式信息的函数举例(调用send_request方法时responseType为text)
2)处理返回格式信息的函数举例(调用send_request方法时responseType为xml)
function processXMLResponse() { if(http_request.readyState == 4) {
if(http_request.status == 200) {
//信息已经成功返回,开始处理信息
alert("XML响应.");
} else {
alert("您所请求的页面有异常.");
}
}
}
标签:
原文地址:http://www.cnblogs.com/li-xin/p/5545560.html