Ajax无刷新技术:
1.生成xhr对象
xhr=new XMLHttpRequest();
2.准备连接
xhr.open(‘get’,‘del.php?id=’+id,true);
3.发送请求
xhr.send();
4.获取php响应数据
xhr.onreadystatechange=function(){
if(xhr.readyState4 && xhr.status200){
s=xhr.responseText;
5.根据响应数据走前端特效
if(s=='1'){
trobj=document.getElementById('tr'+id);
trobj.style.display='none';
}
}
}
**
**
**
**
**
**
**
**
**
**
**