-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvote counter.html
52 lines (49 loc) · 1.28 KB
/
vote counter.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
<html>
<table>
<tr>
<td>
<div class="wpb_wrapper">
<center><class> Vote For the Pets Trailer</class><br>
<script type="text/javascript">
var clicks = 0;
var myCookie = getCookie("vote");
function onClick() {
if ( document.cookie.indexOf('vote=')== -1)
{
clicks += 1;
document.getElementById("clicks").innerHTML = clicks;
document.cookie = "vote=1; expires=Sat, 20 May 2017 00:00:00 EST;";
}
else {
alert("You've voted already");
}
};
</script>
<button type="button" onclick="onClick()">Vote For Pets</button><br>
<a id="clicks">0</a> votes</center>
</div>
</td>
<td>
<div class="wpb_wrapper">
<center><class> Vote For the Sticks and Stones Trailer</class><br>
<script type="text/javascript">
var clicks2 = 0;
function onClick2() {
if ( document.cookie.indexOf('vote=')== -1)
{
clicks2 += 1;
document.getElementById("clicks2").innerHTML = clicks2;
document.cookie = "vote=1; expires=Sat, 20 May 2017 00:00:00 EST;";
}
else {
alert("You've voted already");
}
};
</script>
<button type="button" onclick="onClick2()">Vote For Sticks and Stones</button><br>
<a id="clicks2">0</a> votes</center>
</div>
</td>
</tr>
</table>
</html>