在用window.showModalDialog弹出模态子窗体的时候,有什么办法可以使子窗体居中显示的啊

解决方案 »

  1.   

    if($IsPrint){echo ("<script type='text/javascript'> showModalDialog('printed_invoice.php?TxnNo=$TxnNo','Printed Invoice','dialogWidth:400px;dialogHeight:600px;dialogLeft:300px;dialogTop:100px;center: yes;help:yes;resizable:yes;status:yes');</script>");}你改改,和这个差不多
      

  2.   

    window.showModalDialog("bb.aspx","","dialogLeft:0px;dialogTop:0px;dialogWidth:500px;dialogHeight:500px;center:yes;help:yes;resizable:yes;status:");
    这个是我的代码,但是bb.aspx这个页面就是不居中啊我在bb.aspx里使用了Iframe。详细代码是这样的
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body  leftmargin=0 topmargin=0>
        <form id="form1" runat="server">
        <div>
         
    <iframe src="aa.aspx" style="width:100%;height:100%"></iframe>    </div>
        </form>
    </body>
    </html>