Javascript examples for DOM HTML Element:Dialog
The Dialog object represents an HTML <dialog> element.
You can access a <dialog> element by using getElementById():
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">open the dialog window</button> <dialog id="myDialog">This is an open dialog window</dialog> <script> function myFunction() {// ww w. j a va 2 s . c o m var x = document.getElementById("myDialog"); x.open = true; } </script> </body> </html>