Kishan Kumar

Kishan Kumar

  • 1.7k
  • 127
  • 5.4k

Timer Counter use Don't refresh the page

Feb 17 2018 2:24 AM
How to timer count set and if the refresh page , timer count not refresh.
 
Plese provide me ans.
 
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>jQuery Countdown</title>
<link rel="stylesheet" href="css/jquery.countdown.css">
<style type="text/css">
#defaultCountdown { width: 240px; height: 45px; }
#until30s{
width: 240px; height: 45px;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="js/jquery.plugin.min.js"></script>
<script src="js/jquery.countdown.js"></script>
<script>
$(function () {
var austDay = new Date();
austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
$('#defaultCountdown').countdown({until: austDay});
$('#year').text(austDay.getFullYear());
$('#until30s').countdown({until: +1800});
});
</script>
<script>
window.onbeforeunload = function() {
return "Are you Sure Submit the page ?";
};
</script>
</head>
<body>
<div id="defaultCountdown"></div>
<div id="until30s"></div>
</body>
</html>

Answers (3)