-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathexample 9.html
More file actions
34 lines (27 loc) · 1.08 KB
/
Copy pathexample 9.html
File metadata and controls
34 lines (27 loc) · 1.08 KB
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
34
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Big Title</h1>
<div>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Google_%22G%22_logo.svg/2048px-Google_%22G%22_logo.svg.png" alt="google photo">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Impedit, voluptate cumque? Mollitia fuga non voluptate officia possimus necessitatibus, voluptatibus minus dolor soluta sunt unde, omnis aliquam vel dolores. Iusto, autem!</p>
<button id="alert">click alert</button>
<button id="confirm">click confirm</button>
<button id="prompt">click prompt</button>
</div>
<script>
document.getElementById("alert").onclick = function() {
window.alert("I am an alert box!")
};
document.getElementById("confirm").onclick = function() {
window.confirm("Press a button")
};
document.getElementById("prompt").onclick = function() {
window.prompt("Please,\n enter your name", "Default Name")
};
</script>
</body>
</html>