showModalDialog拒绝访问,求大神指点
var userid = window.showModalDialog("UISelectUser.aspx", '选择用户', 'dialogWidth:450px;dialogHeight:250px;center:yes;help:no;resizable:no;status:no'); //打开模态子窗体,并获取返回值
if (userid != undefined && (userid != "")) {
var dm = document.getElementById("cgrk_id").value;
var ckdstatus = $('#cgrk_status').combobox('getValue');
$.ajax({
url: './handler/delHandler.ashx?id=&type=sentDownWithUser' + "&cgrkjg_dh=" + dm + "&userid=" + userid + "&ckdstatus=" + ckdstatus,
success: function (result) {
var rst = eval("(" + result + ")");
if (rst.msg == "OK") {
alert('加工确认成功!');
var newurl = document.URL.split('?')[0] + "?id=" + dm;
window.navigate(newurl);
} else if (rst.msg == "NotSuccess") {
alert("加工确认失败!");
} else if (rst.msg == "HasSent") {
alert("不允许重复下发给当前选择用户!");
}
}
});
} else {
//alert("下发失败!");
}
}
打开模态窗口执行时报拒绝访问,页面另一个地方调用同一个模态窗口可以打开
相关推荐
使用selenium测试showModalDialog模态对话框
Selenium目前没有提供对IE模态对话框(即通过showModalDialog方法打开的弹出对话框)的处理。原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,所以模态对话框会同时将selenium挂 起,selenium无法选中模态对话框,直至超时。
showModalDialog:window.showModalDialog polyfill 使用元素
ShowModalDialog 填充 这是一个window.showModalDialog() shim,使用模态 HTML5 <dialog>元素和 ECMAScript 2015 Generators 或 ECMAScript 2017 Async/Await。 它在最新的 Google Chrome 和最新的 Mozilla Firefox 中进行了测试,在about:config中将dom.dialog_element.enabled首选项设置为true 。 在使用showModalDialog函数之前,只需包含以下 HTML 代码: [removed][removed] 支持同时传递window.dialogArguments和window.returnValue ,前提是对话文档与宿主文档位于同一
javascript showModalDialog 内跳转页面的问题
在页面中使用了showModalDialog,但是在跳转链接时,不会在当前页执行,而是弹出一个新的页面。
window.showModalDialog的基本用法
window.showModalDialog的基本用法
showModalDialog
NULL 博文链接:https://shoushounihao.iteye.com/blog/1954623


