我的页面卸载 javascript 工作正常,但在 IIS 中没有,我需要为此在 IIS 中授予任何权限吗?这是我的 javascript 不工作
window.onbeforeunload = InitializeService;
function InitializeService() {
InitializeService1();
if (checkdisposition.disposition == "") {
var agree = confirm("You Did Not Save Disposition, Are You Sure You Want To Navigate?");
if (agree) {
return true;
}
else {
return "You Did Not Save Disposition ";
}
}
}
function InitializeService1() {
if (window.XMLHttpRequest) {
var url = "http://localhost:54329/WebServices/PageUnloadCall.asmx?op=Page_Unload";
myReq.onreadystatechange = checkStatus1;
myReq.open("GET", url, false); // true indicates asynchronous request
myReq.send();
}
}