-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·43 lines (42 loc) · 1012 Bytes
/
index.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
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<script>
var typed = 0;
function keyhandler()
{
typed = 1;
}
function changehandler()
{
if(document.getElementById('namebox').value == '')
alert('enter a name');
}
function submithandler()
{
if(typed)
{
startGame();
}
}
</script>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1.0">
<script type="text/javascript" src="enchant.js"></script>
<link rel="shortcut icon" href="assets/mushroom.ico">
<script type="text/javascript" src="main.js"></script>
<style type="text/css">
body {
margin: 0;
}
</style>
<div id='hide'>
<form id='startform' onsubmit='submithandler(); return false;'>
<p>Type something or it won't work</p>
<input type='text' id='namebox' onkeydown='keyhandler()' onchange="changehandler()"'>
<input type='submit' id='name' value='PLAY'>
</form>
</div>
</head>
<body>
</body>
</html>