谷歌浏览器不支持showModalDialog模态对话框的解决方法

忽然发现Chrome浏览器版本 37.0.2062.103 m 不支持showModalDialog模态对话框和无法返回returnValue

项目原先用到的都不能正常执行

找了个折中方案利用window.open代替showModalDialog利用 window.opener.document来操作父页面的元素

window.open("xsp/exesp?todo=13","","height=500,width=280,status=yes,toolbar=no,menubar=no,location=no");


window.close();

window.opener.document.getElementById("classid").value=treeid;

window.opener.document.getElementById("classname").value=treename;

以上是 谷歌浏览器不支持showModalDialog模态对话框的解决方法 的全部内容, 来源链接: utcz.com/z/321160.html

回到顶部