日期:2008-08-28  浏览次数:21326 次

showModalDialog Method<br>
------<br>
Creates a modal dialog box that displays the specified HTML document.<br>

<br>
Syntax<br>
<br>
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])<br>
Parameters<br>
<br>
sURL Required. String that specifies the URL of the document to load and display. <br>
vArguments Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of the window object. <br>
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). <br>
dialogLeft:sXPos Sets the left position of the dialog window relative to the upper-left corner of the desktop. <br>
dialogTop:sYPos Sets the top position of the dialog window relative to the upper-left corner of the desktop. <br>
dialogWidth:sWidth Sets the width of the dialog window (see Remarks for default unit of measure). <br>
center:{ yes | no | 1 | 0 | on | off } Specifies whether to center the dialog window within the desktop. The default is yes. <br>
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. <br>
edge:{ sunken | raised } Specifies the edge style of the dialog window. The default is raised. <br>
help:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the context-sensitive Help icon. The default is yes. <br>
resizable:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window has fixed dimensions. The default is no. <br>
scroll:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays scrollbars. The default is yes. <br>
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. <br>
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. <br>
<br>
<br>
Return Value<br>
<br>
Variant. Returns the value of the returnValue property as set by the window of the document specified in sURL .<br>
<br>
Remarks<br>
<br>
A modal dialog box retains the input focus while open. The user cannot switch windows until the dialog box is closed.<br>
<br>
Because a modal dialog box can include a URL to a resource in a different domain, do not pass information through the vArguments parameter that the user might consider private. The vArguments parameter can be referenced within the modal dialog box using the dialogArguments property of the window object. If the vArguments parameter is defined as a string, the maximum string length that can be passed to the modal dialog box is 4096 characters; longer strings are truncated.<br>
<br>
As of Microsoft&reg; Internet Explorer 4.0, you can eliminate scroll bars on dialog boxes. To turn off the scroll bar, set the SCROLL attribute to false in the body elem