大家好,我的问题简单描述如下:
假如有三个页面,test1.html;test2.html,test3.html
在test1.html中用按钮弹出一个模式对话框,内容是test2.html,关键在test2.html中,我用<a href="javascript:openDiagra2()">tt</a>再弹出一个模式框的时候不起作用,没有弹出来,但是我用按钮就可以弹出来了,请问各位大虾是什么原因。
谢谢!!
附测试页面如下:
test1.html:
<code>
<HTML>
<HEAD>
</HEAD>
<BODY leftMargin=0 topMargin=0 width="100%">
<input type="button" name="test" value="dialogBut" onClick="openDialog()">
<script>
function openDialog()
{
alert(23);
window.showModalDialog("test2.html",window, 'dialogWidth:900px;dialogHeight:600px;Resizable:0;help:no;status:No;center:yes;edge:Raised;');
}
</script>
</BODY>
</HTML>
</code>
test2.html
<code>
<HTML>
<HEAD>
</HEAD>
<BODY leftMargin=0 topMargin=0 width="100%">
<br>
<a href="javascript:openDialog2();">linkOpen</a>
<input type=button value="buttonOpen" onClick="openDialog2();" >
<script>
function openDialog2()
{
alert(1);
window.showModalDialog("test3.html",window, 'dialogWidth:300px;dialogHeight:500px;Resizable:0;help:no;status:No;center:yes;edge:Raised;');
}
</script>
</BODY>
</HTML>
</code>
test3.html
<code>
<HTML>
<HEAD>
<META http-equiv=Expires content=-1>
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Content-Type content="text/html; charset=GBK">
</HEAD>
<BODY leftMargin=0 topMargin=0 width="100%">
the last page
</BODY>
</HTML>
<code>