模态窗口打开后,如何自动改变自身的大小

j99616 2004-04-21 02:45:15
我打开模态窗口后,改变它的大小
用了window.dialogWidth=1000;
用BUTTON CLICK可以实现,
但是我放在了BODY的ONLOAD里却没有反映,
怎么样才能让窗口打开后就改变呢?
...全文
104 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
dullwolf 2004-04-21
  • 打赏
  • 举报
回复
Syntax
variant = object.showModalDialog(sURL [, vArguments [, sFeatures]])



Parameter Description
sURL String specifying the URL of the document to load and display. While an empty string is accepted (""), it should be noted that this is useless since once a modal dialog has been opened, it cannot be accessed by the page that opened it.
vArguments Optional. Variant specifying the arguments to use when displaying the document. This parameter can be used to pass a value of any type including an array of values. The dialog can extract the values passed by the caller from the dialogArguments property of the window object.
sFeatures Optional. String specifying the window ornaments for the dialog box. It can be a combination of the following values. Syntax Description
dialogWidth:number Sets the width of the dialog window.
dialogHeight:number Sets the height of the dialog window.
dialogTop:number Sets the top position of the dialog window relative to the upper-left corner of the desktop.
dialogLeft:number Sets the left position of the dialog window relative to the upper-left corner of the desktop.
center:{yes | no | 1 | 0 } Specifies whether to center the dialog window within the desktop. Default is yes.

dullwolf 2004-04-21
  • 打赏
  • 举报
回复
dialogArguments

--------------------------------------------------------------------------------

Description

Returns the variable or array of variables passed into the modal dialog window.

Syntax
object.dialogArguments



Remarks

This property applies only to windows created using the showModalDialog method.

This property has read-only permission, meaning you can retrieve its current value, but not change it.

Applies To

window

注意:此属性是只读的!你只能最开始设置好
nevana 2004-04-21
  • 打赏
  • 举报
回复
呵呵,提个题外话,个人觉得showMouduleDialog应该小心使用,特别
在刷新父窗口时,如果不是IE6会出很多问题的,还有iframe........

小心,小心:)
孟子E章 2004-04-21
  • 打赏
  • 举报
回复
http://www.csdn.net/Develop/read_article.asp?id=15113
孟子E章 2004-04-21
  • 打赏
  • 举报
回复
只能再打开时设置
"dialogWidth:200;dialogHeight:300"
tylike 2004-04-21
  • 打赏
  • 举报
回复
大父级中记录子级
在子级中调用父级中的变量,来改变本身的宽度,试试吧,应该行

87,910

社区成员

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

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