-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
varurl='http://192.168.4.1:8082/Person/Detail';
//AjaxUtil.addURLParam(url,'id',920);
//AjaxUtil.addURLParam(url,'t',Math.random());
varxhr=AjaxUtil.createXHR();
xhr.onreadystatechange=function(){
if(xhr.readyState==4){
if((xhr.status>=200&&xhr.status<300)||xhr.status==304){
alert(xhr.responseText);
}else{
alert('请求失败!'+xhr.status);
}
}
}
xhr.open('post',url,true);
//设置请求头必须在open()方法之后,send()方法之前
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
//xhr.open('get',true);
xhr.send("id=920");
489

被折叠的 条评论
为什么被折叠?



