-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
127 lines (121 loc) · 5.46 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html>
<head>
<title>Contador - Menu</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<header>
<div class="container">
<div class="titulo nav-wrapper valing-wrapper center-align">
<h3 class="light grey-text">Contando pontos</h3>
<br>
</div>
</div>
</header>
<div class="container">
<form method="post">
<table class="container centered striped responsive-table">
<tr>
<td>Nome</td>
<td>Ação</td>
<td id="somou"></td>
</tr>
<tr>
<td>Equipe Azul</td>
<td>
<a class="waves-effect blue darken-4 btn" onclick="somaAzul()">Votar</a>
<input type="hidden" id="azul">
</td>
<td>
<div id="resultadoAzul"></div>
</td>
</tr>
<tr>
<td>Equipe Verde</td>
<td>
<a class="waves-effect green darken-4 btn" onclick="somaVerde()">Votar</a>
<input type="hidden" id="verde">
</td>
<td>
<div id="resultadoVerde"></div>
</td>
</tr>
<tr>
<td>Equipe Amarelo</td>
<td>
<a class="waves-effect amber accent-3 btn" onclick="somaAmarelo()">Votar</a>
<input type="hidden" id="amarelo">
</td>
<td>
<div id="resultadoAmarelo"></div>
</td>
</tr>
<tr>
<td>Equipe Rosa</td>
<td>
<a class="waves-effect red accent-3 btn" onclick="somaRosa()">Votar</a>
</td>
<td>
<div id="resultadoRosa"></div>
</td>
</tr>
<tr>
<td>Equipe Vermelha</td>
<td><a class="waves-effect red accent-4 btn" onclick="somaVermelho()">Votar</a></td>
<td><div id="resultadoVermelho"></div></td>
</tr>
<tr>
<td colspan="3" style="text-align: center"><a class="waves-effect grey accent-4 btn" onclick="apura()">Apurar</a></td>
</tr>
</table>
</form>
<div id="resultado" style="background-color: red; width: 100px; height: 100px; margin-left: 45%">daksdaj</div>
</div>
<footer class="page-footer red darken-4">
<div class="footer-copyright">
<div class="container">
© 2016 Copyright Text | <a class="grey-text text-lighten-4" href="https://www.facebook.com/kelvin.eger.5">Kelvin Eger</a>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
var totalVermelho = 0;
var totalAmarelo = 0;
var totalAzul = 0;
var totalRosa = 0;
var totalVerde = 0;
$(document).ready(function () {
$('#resultado').hide();
});
function somaVermelho() {
totalVermelho++;
}
function somaAmarelo() {
totalAmarelo++;
}
function somaAzul() {
totalAzul++;
}
function somaRosa() {
totalRosa++;
}
function somaVerde() {
totalVerde++;
}
function apura() {
document.getElementById('somou').innerHTML = '<b>Resultados</b>';
document.getElementById('resultadoRosa').innerHTML = totalRosa;
document.getElementById('resultadoAzul').innerHTML = totalAzul;
document.getElementById('resultadoVermelho').innerHTML = totalVermelho;
document.getElementById('resultadoAmarelo').innerHTML = totalAmarelo;
document.getElementById('resultadoVerde').innerHTML = totalVerde;
}
</script>
</body>
</footer>
</body>
</html>