The local storage is only on aktuell Divice. When you check localStorage, when it has value you must prevent votting
<html>
<head>
<script language="javascript">
function clickCounter() {
if(typeof(Storage) !== "undefined") {
if (!localStorage.clickcount) {
localStorage.clickcount = 1;
}else{
document.getElementById("voted").innerHTML ="You have allreay Voted"; //show message you have allreay Voted
}
document.getElementById("result").innerHTML = localStorage.clickcount;
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not support web storage...";
}
}
</script>
<style>
.counter {
position: absolute;
border: 1.5px solid #50915F;
width: 350px;
height: 200px;
background: white;
top: 30%;
left: 40%;
}
.keke{
position: absolute;
border-width: 0;
background: transparent;
top: 30%;
left: 44%;
text-align: center;
margin: auto;
font-size: 45px;
}
.gbutton {
position: absolute;
top: 60%;
left:37%;
}
.button {
background-color: #50915F;
border: none;
color: black;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
}
.button2:hover {
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
}
</style>
</head>
<body>
<div class="counter">
<center><font face="Lato" id="voted"> Vote here</font></center><br>
<div id="result" class="keke"></div>
<button class="button button2 gbutton" onclick="clickCounter();this.disabled=true" type="button">Vote</button>
</div>
</body>
</html>