-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathbutton.html
More file actions
26 lines (24 loc) · 1.01 KB
/
Copy pathbutton.html
File metadata and controls
26 lines (24 loc) · 1.01 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
<!DOCTYPE html>
<html>
<head><title>JavaScript Button Example</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
button{position: absolute; background-color:lightgray;margin-left: 47%; margin-top: 25%; border-style: doubl; border-radius: 50%;border-color: darkgray;box-shadow: 2px 4px;}
</style>
</head>
<body>
<div class="well-sm">
<button id='squeeze'>Squeeze me</button>
</div>
<script>
let button = document.getElementById("squeeze");
function shout(){
alert("... and I squeak");
}
button.addEventListener("click", shout);
</script>
</body>
</html>