一般用asp较多,今天遇到一段jsp代码不懂,烦劳大家帮忙看看
function send_request(url,str) {var http_request = false;
if(window.XMLHttpRequest) {
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType){
http_request.overrideMimeType('text/xml');
}
}else if(window.ActiveXObject){
try {http_request = new ActiveXObject("Msxml2.XMLHTTP");}catch (e){
try {http_request = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {}
}
}
if (!http_request) {
window.alert("不能创建XMLHttpRequest对象实例.");
return false;
}
http_request.open("GET",url, true);
http_request.onreadystatechange=function(){
if (http_request.readyState == 4) {
if (http_request.status == 200) {
document.getElementById(str).innerHTML= http_request.responseText;
} else {
alert("您所请求的页面有异常。");
}
}
}
http_request.send(null);
}
当反馈“您所请求的页面有异常”时,请问是那里出了问题,谢谢大家