-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
29 lines (29 loc) · 981 Bytes
/
index.html
File metadata and controls
29 lines (29 loc) · 981 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>e4494s</title>
<link rel = 'icon' href = '/favicon.png' type = 'image/png'/>
<link rel="stylesheet" type="text/css" href="/stylesheets/main.css">
</head>
<body>
<h1>e4494s</h1>
<p id = 'clickcount'>You have clicked the button 0 times.</p>
<button id = 'clickbutton' onclick = 'clicked()'>+1 click</button>
<p class = 'break'></p>
<a href = '/circles.html' target = '_blank'>Circles</a>
<p class = 'break'></p>
<a href = '/testbed-backup.html' target = '_blank'>Testbed Backup</a>
</body>
</html>
<script type = 'text/javascript'>
let clicks = 0;
let clickcount = document.getElementById('clickcount');
let clickbutton = document.getElementById('clickbutton');
function clicked() {
clicks++;
clickcount.innerHTML = `You have clicked the button ${clicks} times.`;
}
clickbutton.onkeydown = function(e){
if (e.which == 13 || e.which == 32) e.preventDefault();
}
</script>