Latest web development tutorials

HTML DOM Dialog open properties

Dialog Object Reference Dialog Object

Examples

Open a conversation window:

. Document.getElementById ( "myDialog") open = true;

try it"

Definition and Usage

open property sets or returns the conversation window is open.

This property reflects the <dialog> open property.

If this attribute is specified, and described the conversation window is available, the user can interact with it.

Note: <dialog> element is the new HTML5.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Note: Currently, only Chrome Canary, Safari 6 browser supports open property.

Note: Even if Chrome Canary Support <dialog> element, you must open in the Chrome address bar chrome: // flags and turn "Enable experimental Web Platform features" tag. After the turn, you need to restart the Chrome browser.

grammar

Back open properties:

dialogObject .open

Setting open properties:

dialogObject .open = true | false

Property Value

value description
true | false Specifies whether the dialog window opens
  • true - dialog window is open
  • false - default. Dialog window is closed.

technical details

return value: Boolean value, if the conversation window is open returns TRUE, otherwise returns FALSE.


More examples

Examples

View conversation window is open:

var x = document.getElementById ( "myDialog") open.;
x The output is:
true

try it"


related articles

HTML Reference Manual: HTML <Dialog> Properties Open


Dialog Object Reference Dialog Object