如何改变弹出的模态框的大小

qndt 2005-06-23 11:19:29
使用 showModalDialog 弹出 test.html

test.html 包含一个隐含祯 1.html ,和一个主体内容文件 2.html 。

希望在 2.html 的某个按钮上执行一个事件,改变整个 test.html 窗口的大小。

open 弹出的窗口我试了,可以,不知道 showModalDialog 的该这么写。

谢谢!
...全文
357 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
qndt 2005-06-23
  • 打赏
  • 举报
回复
午饭归来,问题未解,顶出去,高手们,请支招。
AIRFLYNET 2005-06-23
  • 打赏
  • 举报
回复
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
sFeatures Optional.
String that specifies the window ornaments for the dialog box, using one or more of the following semicolon-delimited values: dialogHeight:sHeight Sets the height of the dialog window (see Remarks for default unit of measure).
dialogLeft:sXPos Sets the left position of the dialog window relative to the upper-left corner of the desktop.
dialogTop:sYPos Sets the top position of the dialog window relative to the upper-left corner of the desktop.
dialogWidth:sWidth Sets the width of the dialog window (see Remarks for default unit of measure).
center:{ yes | no | 1 | 0 | on | off } Specifies whether to center the dialog window within the desktop. The default is yes.
dialogHide:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window is hidden when printing or using print preview. This feature is only available when a dialog box is opened from a trusted application. The default is no.
edge:{ sunken | raised } Specifies the edge style of the dialog window. The default is raised.
help:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the context-sensitive Help icon. The default is yes.
resizable:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window has fixed dimensions. The default is no.
scroll:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays scrollbars. The default is yes.
status:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays a status bar. The default is yes for untrusted dialog windows and no for trusted dialog windows.
unadorned:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the border window chrome. This feature is only available when a dialog box is opened from a trusted application. The default is no.
JK_10000 2005-06-23
  • 打赏
  • 举报
回复
<input type=button value=test onclick="top.dialogWidth='10px';top.dialogHeight='200px';">

87,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧