Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <dialog>
- <p>окно</p>
- <button id="close">Закрыть</button>
- </dialog>
- <button id="show">Открыть окно!</button>
- <script type = text/javascript>
- var dialog = document.querySelector('dialog');
- document.querySelector('#show').onclick = function() {
- dialog.show();
- };
- document.querySelector('#close').onclick = function() {
- dialog.close();
- };
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement