1
I have this code that is counting the amount of Clicks, only I wish that when closing the Browser the counter does not reset.
var p = document.createElement("p");
document.body.appendChild(p);
$(document).ready(function(){
var cout = 0;
$("#btnCount").click(function(){
cout = cout+1;
$('p').html(cout);
});
});
<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>Document</title>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
</head>
<body>
<button type="button" id="btnCount">Click me</button>
</body>
</html>