by
19
7
3,360
1
Top 1% !
Popular
Famous
Nice
Easy-to-find
Specified
Pattern
Popularity: 3719th place
LanguageHTML
LicenseMIT_X11
SourceGitHub
SourceMyGists

Dialog tag example

Dialog tag example: 
dilogSnippet.html
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/136108/Dialog-tag-example?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
<dialog> <p>This is da dialog!</p> <button id="close">Close</button> </dialog> <button id="show">Open Dialog!</button> <script> var dialog = document.querySelector('dialog'); document.querySelector('#show').onclick = function() { dialog.show(); }; document.querySelector('#close').onclick = function() { dialog.close(); }; </script>
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus