HTML DOM Dialog object
Dialog object
Dialog objects represent HTML and dialog elements.
Note: Currently only Chrome Canary, Safari 6, supports the elements.
Access the Dialog object
You can use getElementById() to access the elements:
Create a Dialog object
You can use the document.createElement() method to create an element:
Dialog object properties
Property | Describe |
---|---|
open | Set or go back to whether the conversation window is open |
returnValue | Set or return the return value of dialog |
Dialog object method
Method | Describe |
---|---|
close() | Close the conversation window |
show() | The dialog box that is displayed |
showModal() | Displays the dialog box and makes it the top-level dialog box |
Standard properties and events
Dialog objects also support standard properties and events.
Related articles
HTML Reference Manual: HTML slt;dialog> Tags