FireFox中使用window.open打开模式窗口
已经加了modal=yes
还是没有效果
function test()
{
if (document.all)
{
var str = window.showModalDialog("usertree.aspx",null,"dialogWidth:400px; dialogHeight:500px; help:no; resizable:no; status:no");
if (str != null)
alert(str);
}
else
{
this.returnAction=function(str)
{
if (str != null)
alert(str);
}
window.open("usertree.aspx",null,"width=400px,height=800px,help=no,resizable=no,status=no,modal=yes,location=no");
}
}
代码如上
大家帮帮忙
已经加了modal=yes
还是没有效果
function test()
{
if (document.all)
{
var str = window.showModalDialog("usertree.aspx",null,"dialogWidth:400px; dialogHeight:500px; help:no; resizable:no; status:no");
if (str != null)
alert(str);
}
else
{
this.returnAction=function(str)
{
if (str != null)
alert(str);
}
window.open("usertree.aspx",null,"width=400px,height=800px,help=no,resizable=no,status=no,modal=yes,location=no");
}
}
代码如上
大家帮帮忙
可以用div模拟<html>
<head>
<title>
标题
</title><script type="text/javascript">
function ShowWindow()
{
document.getElementById("divDialog").style.display = "";
}
function CloseWindow()
{
document.getElementById("divDialog").style.display = "none";
//这里写你要的赋值操作,比如将textBox1值赋为"已设置"
document.getElementById("textBox1").value = "已设置";
}
</script>
</head>
<body>
<!--
这个DIV就是弹出的窗口,按下面的参数设置修改一下就可以了
-->
<div id="divDialog" style="display:none;position:absolute;top:距窗口顶部的距离px;left:距窗口左边的距离px;background:url('图片地址');width:图片宽度px;height:图片高度px;">
<input type="button" value="单击我关闭对话框" onclick="CloseWindow()" />
</div><input type="button" value="单击我显对话框" onclick="ShowWindow();" /> <input type="text" id="textBox1" value="" /></body>
</html>
可以用div模拟
------------
没听说过
但是效果都不同,FF3是默认最大化,而FF2和IE6相同。但是IE6的OPEN。也不支持一直在顶端,
解决方法,只有在焦点跑到弹出window.open的窗口时,设置焦点open的窗口里的body上