A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/zh-CN/docs/Web/API/HTMLDialogElement/showModal below:

Window.showModalDialog() - Web API | MDN

Window.showModalDialog()

Baseline Widely available

已弃用: 不再推荐使用该特性。虽然一些浏览器仍然支持它,但也许已从相关的 web 标准中移除,也许正准备移除或出于兼容性而保留。请尽量不要使用该特性,并更新现有的代码;参见本页面底部的兼容性表格以指导你作出决定。请注意,该特性随时可能无法正常工作。

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

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

其中

Syntax Description 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: height Specifies the height of the dialog box; by default, the size is specified in pixels. dialogleft: left Specifies the horizontal position of the dialog box in relation to the upper-left corner of the desktop. dialogwidth: width Specifies the width of the dialog box; by default, the size is specified in pixels. dialogtop: top Specifies 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.

备注: 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4