From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/window/showmodaldialog/index.html | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 files/zh-cn/web/api/window/showmodaldialog/index.html (limited to 'files/zh-cn/web/api/window/showmodaldialog') diff --git a/files/zh-cn/web/api/window/showmodaldialog/index.html b/files/zh-cn/web/api/window/showmodaldialog/index.html new file mode 100644 index 0000000000..81c0bb505f --- /dev/null +++ b/files/zh-cn/web/api/window/showmodaldialog/index.html @@ -0,0 +1,80 @@ +--- +title: Window.showModalDialog() +slug: Web/API/Window/showModalDialog +translation_of: Web/API/Window/showModalDialog +--- +
{{ Fx_minversion_header(3) }} {{ deprecated_header() }}{{APIRef}}
+ +

 Window.showModalDialog() 用于创建和展示一个指向特定网页的模态对话框。

+ +

语法

+ +
returnVal = window.showModalDialog(uri[, arguments][, options]);
+
+ +

其中

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SyntaxDescription
center: {on | off | yes | no | 1 | 0 }If this argument's value is on, yes, or 1, the dialog window is centered on the desktop; otherwise it's hidden. The default value is yes.
dialogheight: heightSpecifies the height of the dialog box; by default, the size is specified in pixels.
dialogleft: leftSpecifies the horizontal position of the dialog box in relation to the upper-left corner of the desktop.
dialogwidth: widthSpecifies the width of the dialog box; by default, the size is specified in pixels.
dialogtop: topSpecifies the vertical position of the dialog box in relation to the upper-left corner of the desktop.
resizable: {on | off | yes | no | 1 | 0 }If this argument's value is on, yes, or 1, the dialog window can be resized by the user; otherwise its size is fixed. The default value is no.
scroll: {on | off | yes | no | 1 | 0 }If this argument's value is on, yes, or 1, the dialog window has scroll bars; otherwise its size is fixed. The default value is no.
+ +

{{Note("Firefox does not implement the dialogHide, edge, status, or unadorned arguments.")}}

+ +

Compatibility

+ +

Introduced by Microsoft Internet Explorer 4. Support added to Firefox in Firefox 3 (deprectated in Fx 28), and to Safari in Safari 5.1.

+ +

Examples

+ +

Try out showModalDialog().

+ +

Notes

+ +

showModalDialog() is currently being standardized as part of HTML5. The third argument (for additional options) is not present in the HTML5 version, and is (safely) ignored by both Safari and Chrome.

+ +

Specification

+ + -- cgit v1.2.3-54-g00ecf