-
Notifications
You must be signed in to change notification settings - Fork 0
/
zelda.html
71 lines (61 loc) · 2.2 KB
/
zelda.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="zelda.css">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
<title>Game Retro</title>
</head>
<body>
<main>
<div class="main-text">
<h1>
Game <span>Retro</span>
</h1>
<div class="copy">
<p>Calculadora de Soma</p>
© 2023 Site desenvolvido por <a href="https://fherexe.github.io/PortfolioPessoal/">Fher</a> todos direitos reservados.
</div>
<div class="tutorial">
<h3>Tutorial:</h3>
<span><p class="exemple">Y Trocar ferramenta</p> </span>
<span><p class="exemple">X Stop </p></span>
<span><p class="exemple">B Reset</p></span>
<span><p class="exemple">A Start</p></span>
</div>
</div>
<div class="gameboy">
<div class="bg-sup"></div>
<div class="display">
<div class="somador">
<input type="number" name="valor1" id="valor1">
<h2>+</h2>
<input type="number" name="valor2" id="valor2">
<div id="resp">0</div>
</div>
</div>
<div class="buttons">
<a href="index.html"><button>Y</button></button></a>
<div class="item1">
<button>B</button>
<button>X</button>
</div>
<button onclick="somar()">A</button>
</div>
</div>
</main>
<script>
function somar() {
var v1 = window.document.getElementById('valor1');
var v2 = window.document.querySelector('input#valor2');
var resp = window.document.getElementById('resp');
var n1 = Number(v1.value);
var n2 = Number(v2.value);
var resultado = n1 + n2;
resp.innerHTML = `${resultado}`; //placeholders
}
</script>
</body>
</html>