The Dialog object represents an HTML <dialog> element.
注: The <dialog> element is currently only supported in Chrome 37+, Safari 6+ and Opera 24+.
You can access a <dialog> element by using getElementById():
You can create a <dialog> element by using the document.createElement() method:
Property | 説明 |
---|---|
open | Sets or returns whether a dialog should be open or not |
returnValue | Sets or returns the dialog's return value |
Method | 説明 |
---|---|
close() | Closes the dialog |
show() | Shows the dialog |
showModal() | Shows the dialog and makes it the top-most modal dialog |
The Dialog object also supports the standard properties and events.
HTML reference: HTML <dialog> tag