-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (47 loc) · 1.18 KB
/
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
43
44
45
46
47
48
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/styles.css">
<link href="https://fonts.googleapis.com/css?family=Rubik+Mono+One" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Bree+Serif" rel="stylesheet">
<link rel="shortcut icon" href="img/logo.ico" />
<title>Login</title>
</head>
<style>
body{
background-image: url(img/main.gif);
background-size:cover;
}
.conteiner{
width: 500px;
margin: auto;
}
#rg{
margin: 50px auto;
}
</style>
<body id="ba">
<div class="conteiner">
<div id="logos"></div>
<img id="aaa" src="img/aaa.png">
<form id="rg" onsubmit="create_player(this)">
<p>Name:<br>
<input class="in" type="text"></p>
<input id="sb" type="submit" value="Go">
</form>
</div>
</body>
<script>
function create_player(e){
event.preventDefault();
let input_name = e.querySelectorAll(".in")[0].value;
localStorage.setItem("name",input_name);
localStorage.setItem("hp",1);
localStorage.setItem("speed",200);
localStorage.setItem("lvl",1);
localStorage.setItem("gold",0);
localStorage.setItem("boss",5);
window.location.href="game.html";
}
</script>
</html>