当前位置: 代码迷 >> Web前端 >> showModalDialog 打开后随便改变大小
  详细解决方案

showModalDialog 打开后随便改变大小

热度:673   发布时间:2013-11-20 12:46:02.0
showModalDialog 打开后任意改变大小

父窗口JS

<script language=javascript>

window.showModalDialog("http://ofyou.com/system/test1.html","Dialog Box","dialogHeight: 300px; dialogWidth: 300px; dialogTop: 250px; dialogLeft: 300px; edge: Sunken; center: No; help: No; resizable: No; status: No;");

</script>

?

模态对话框JS

<body>

<br>test1.html的代码:<br>
<script language=javascript>

function adjustDims()

{

window.dialogHeight = ''+(window.document.all.tags("body")[0].scrollHeight+230)+'px';

window.dialogWidth = '' +(window.document.all.tags("body")[0].scrollWidth+230)+'px';

}

</script>

</body>

  相关解决方案