Example for you
-----------------------
<body onload="display_c(1121);" >
<script type="text/javascript">
function display_c(start) {
window.start = parseFloat(start);
var end = 0
var refresh = 1000;
if (window.start >= end) {
mytime = setTimeout('display_ct()', refresh)
}
else {
display_ct()();
$("#Button1").prop('disabled', true);
alert("Time Over ");
}
}
function display_ct() {
var days = Math.floor(window.start / 86400);
var hours = Math.floor((window.start - (days * 86400)) / 3600)
var minutes = Math.floor((window.start - (days * 86400) - (hours * 3600)) / 60)
var secs = Math.floor((window.start - (days * 86400) - (hours * 3600) - (minutes * 60)))
var x = window.start + "(" + days + " Days " + hours + " Hours " + minutes + " Minutes and " + secs + " Secondes " + ")";
document.getElementById('day').innerHTML = days;
document.getElementById('hours').innerHTML = hours;
document.getElementById('minutes').innerHTML = minutes;
document.getElementById('second').innerHTML = secs;
window.start = window.start - 1;
tt = display_c(window.start);
}
</script>