JSP如何实现无闪烁刷新(已有代码)
varxmlHttpRequest;varchcId;functioncreateXmlHttpRequest(){if(window.ActiveXObject)ret...
var xmlHttpRequest; var chcId; function createXmlHttpRequest(){ if(window.ActiveXObject)return new ActiveXObject("Microsoft.XMLHTTP"); else if(window.XmlHttpRequest)return new XmlHttpRequest(); } function del(id){ if(window.confirm("确定删除该记录吗?")){ xmlHttpRequest=createXmlHttpRequest(); url="/cms/salChanceManager.do?o=del&chcId="+id; xmlHttpRequest.onreadystatechange=haoLeJiaoWo; xmlHttpRequest.open("GET",url,false); xmlHttpRequest.send(); } } function haoLeJiaoWo(){ if(xmlHttpRequest.readyState == 4 && xmlHttpRequest.status == 200){ var text=xmlHttpRequest.responseText; if(text == "1") document.getElementById("tab").deleteRow(window.event.srcElement.parentElement.parentElement.rowIndex); } } 麻烦帮我参考下,谢谢
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询