forked from homa31/CSE134B-HW4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
customdialog.html
33 lines (33 loc) · 1.1 KB
/
customdialog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/dompurify@2.3.2/dist/purify.min.js"></script>
<title>Custom Dialogs Test</title>
</head>
<body>
<button id="alert-btn">Alert</button>
<button id="confirm-btn">Confirm</button>
<button id="prompt-btn">Prompt</button>
<br>
<output id="confirm-output"></output>
<dialog id="alert-dialog">
<h2>Alert pressed!</h2>
<button id="close-alert-dialog-button">Ok</button>
</dialog>
<dialog id="confirm-dialog">
<h2>Do you confirm this?</h2>
<button id="cancel-confirm-dialog-button">Cancel</button>
<button id="ok-confirm-dialog-button">Ok</button>
</dialog>
<dialog id="prompt-dialog">
<h2>What is your name?</h2>
<input id="prompt-dialog-input">
<button id="prompt-cancel-dialog-button">Cancel</button>
<button id="prompt-ok-dialog-button">Ok</button>
</dialog>
<script type="module" src="customdialog.js"></script>
</body>
</html>