var xmlHttp;
function createXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject(""Microsoft.XMLHTTP""); } else if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } } function handleStateChange() { if(xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { alert(xmlHttp.responseText);//返回文本值 window.location.href='DocManageNewBefore.htm'; } } } function del_word(FileSize,FileMD5) { if(confirm('确认删除当前文档吗?')) { createXMLHttpRequest(); xmlHttp.onreadystatechange = handleStateChange; xmlHttp.open(""GET"", ""Deldc.aspx?FileSize=" + FileSize+"&FileMD5="+FileMD5+@""", true); xmlHttp.send(null); } } |
转载于:https://www.cnblogs.com/Mr-Xia/archive/2011/09/07/2169474.html