Sets or retrieves the height of the modal dialog window.
dhtml语法
window.dialogHeight [ = sHeight ]
DHTML可能的值
sHeight | Variant that
specifies or receives the height of the dialog window (see Remarks for default unit of measure). |
The property is read/write.
The property has no default value.
Remarks
The dialogHeight property applies only to windows created using the showmodaldialog and showmodelessdialog methods.
the default unit of measure for dialogheight and dialogwidth in microsoft® internet explorer 4.0 is the em; in internet explorer 5 it is the pixel. the value can be an integer or floating-point number, followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). for consistent results, specify the dialogheight and dialogwidth in pixels when designing modal dialog boxes.
although a user can manually adjust the height of a dialog box to a smaller valueprovided the dialog box is resizablethe minimum dialogheight you can set using script is 100 pixels.
DHTML代码范例
This example creates a dialog window using the dialogHeight property to set the new window's height.
<SCRIPT>
function someMessage()
{
event.srcElement.blur();
window.showModalDialog("message.htm", "",
"dialogWidth:5cm; dialogHeight:10cm")
}
</SCRIPT>
</HEAD>
<BODY>
<SELECT onchange="someMessage()">
<OPTION>Item 1</OPTION>
<OPTION>Item 2</OPTION>
<OPTION>Item 3</OPTION>
</SELECT>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
是否符合公共标准
There is no public standard that applies to this property.
Applies To