xxxxxxxxxx
<html>
<head>
<script>
var dialog = document.querySelector("dialog");
document.querySelector("#open").onclick = function () {
dialog.show();
};
document.querySelector("#close").onclick = function () {
dialog.close();
};
</script>
</head>
<body>
<h1>Basic dialog element example</h1>
<dialog>
<p>This is dialogue window.</p>
<button id="close">Close me</button>
</dialog>
<button id="open">Open Dialog</button>
</body>
</html>