最近在项目中用到了
showModalDialog,在测试中,IE,Firefox中正常运行,但是在google中,点击后没什么反应,在网上看了一下,谷歌浏览器不支持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;
问题解决^_^