81,091
社区成员
发帖
与我相关
我的任务
分享
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState == 4){
if(xmlHttp.status == 200){
if(trim(xmlHttp.responseText) != ""){
document.getElementById("spanClientId").innerHTML = "<font color='red'>" + xmlHttp.responseText + "<font>";
}else{
document.getElementById("spanClientId").innerHTML = "";
}
}else{
alert("请求失败,错误码=【" + xmlHttp.status + "】");
}
}
};
$.ajax({
type: "POST",
url: "/CPSolution/allResourceAction.html",
dataType:"html",
data: {"menuNumber":index},
success: function(data){
initiate();// ajax提交返回成功之后调init方法
},
error:function(){
alert($("#content" + i)+"加载失败");
}
});