HTML - Tags - <dialog>

#38 of 147
dialog
Next dir
Prev dfn

 <html>
 <body>
     <dialog id="searching">
         <p>Searching ...</p>
         <button>Cancel</button>
     </dialog>
     <script>
         (function () {
              var dialog = document.getElementById('searching');
              dialog.show();
         })();
     </script>
 </body>
 </html>
 

The dialog element was originally created to represent spoken conversation.

Experimental

It has been repurposed as a tool for displaying popup windows.

A live example:


Searching ...


N of

Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath