-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoting.html
More file actions
65 lines (60 loc) · 1.68 KB
/
voting.html
File metadata and controls
65 lines (60 loc) · 1.68 KB
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
<!DOCTYPE html>
<html lang=”en”>
<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">
<title>Voting</title>
<!--<link rel="stylesheet" type="text/css" href="index.css">-->
<!--<script src="./node_modules/web3/dist/web3.min.js"></script>-->
<link href='./bootstrap.min.css' rel='stylesheet' type='text/css'>
</head>
<body class="container">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="./web3.js"></script>
<script src="./index.js"></script>
<h1>BlockVote</h1>
<div id="ID">Your Account ID: </div>
<div id="bal">Balance: </div>
<hr>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Candidate</th>
<th>Votes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Candidate 1</td>
<td id="candidate-1"></td>
</tr>
<tr>
<td>Candidate 2</td>
<td id="candidate-2"></td>
</tr>
<tr>
<td>Candidate 3</td>
<td id="candidate-3"></td>
</tr>
</tbody>
</table>
</div>
<label for="name" class="col-lg-2 control-label">Voter Id</label>
<input type="text" id="vvid">
<hr>
<select id="candidate">
<option value="1">Candidate 1</option>
<option value="2">Candidate 2</option>
<option value="3">Candidate 3</option>
</select>
<a href="#" onclick="voteForCandidate()" class="btn btn-primary" id="vote">Vote</a>
<a href="#" onclick="countForCandidate()" class="btn btn-primary">Count</a>
<hr>
<a href="#" onclick="winner()" class="btn btn-primary" id="win1">Winner</a>
<br><br>
<div id="win"></div>
</div>
</body>
</html>