我用下面这段JS在IE6.0上面可以实现。
但是在IE8上,子窗口能打开,父窗口呈现“假死”状态,而且只能操作当前的子窗口。
只有关闭子窗口后,父窗口才会一起消失。
function findren()
{
strWidth="1024px";
strHeight="740px";
window.showModalDialog('WebForm2.aspx','dialogWidth:' + strWidth + ';dialogHeight:' + strHeight + ';scroll:no;resizable:no;status:no;help:no');
window.opener=null;
window.open('','_self');
window.close();
}问题:能否实现弹出子窗口后,父窗口直接关闭,消失也可以。只要看不见。
但是在IE8上,子窗口能打开,父窗口呈现“假死”状态,而且只能操作当前的子窗口。
只有关闭子窗口后,父窗口才会一起消失。
function findren()
{
strWidth="1024px";
strHeight="740px";
window.showModalDialog('WebForm2.aspx','dialogWidth:' + strWidth + ';dialogHeight:' + strHeight + ';scroll:no;resizable:no;status:no;help:no');
window.opener=null;
window.open('','_self');
window.close();
}问题:能否实现弹出子窗口后,父窗口直接关闭,消失也可以。只要看不见。
并且 window.open window.showModalDialog这写方法,浏览器支持并不友好.楼主是不是想 实现 弹出一个遮罩层,层里显示一写内容?可以使用js来做,推荐个插件
http://www.planeart.cn/demo/artDialog/_doc/new.html