http://www.csdn.net/Develop/read_article.asp?id=15113

解决方案 »

  1.   

    你的意思是让showmodaldialog打开的窗口居中显示吗??
      

  2.   

    可以啊
    showModalDialog('1.html',10,'center:yes;');
      

  3.   

    other.html
    <html><body><input type="button" value="dis" onClick="showModalDialog('test6.htm','','dialogleft=0;')">
    </body>
    </html>
    test6.html<html>
    <body ><input type=button value=center onclick="window.dialogLeft = (window.screen.availWidth - parseInt(window.dialogWidth)) / 2;window.dialogTop = (window.screen.availHeight - parseInt(window.dialogHeight)) / 2">
    <input id=pp type=text maxLength=4 value=exam>
    </body>
    </html>