Javascript examples for DOM HTML Element:Dialog
Dialog open Property - Find out if a dialog window is open or not:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <dialog id="myDialog" open>This is an open dialog window</dialog> <script> function myFunction() {//from w ww . ja va2 s .c om var x = document.getElementById("myDialog").open; document.getElementById("demo").innerHTML = x; } </script> </body> </html>