Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<html>
<head>
<title>TEST</title>
<script type="text/javascript">
function Countdown() {
var number;
self = this;
this.setTime = function(value) {
number = value;
};
this.start = function() {
countdownfunc();
};
function countdownfunc() {
if(number > -1) {
setTimeout("self.start()", 1000);
document.getElementById("time").innerHTML = (number--);
}
}
}
window.onload = function() {
var test = new Countdown();
test.setTime(15);
test.start();
};
//]]>
</script>
</head>
<body>
<div style="border:1px solid;width:20px;text-align:center;" id="time"></div>
</form>
</body>
</html>
<script>
var countDownInterval=5;
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=-1){
countDownTime=countDownInterval;
clearTimeout(counter)
return
}
if (document.getElementById)
document.getElementById("countDownText").innerHTML=countDownTime+" "
counter=setTimeout("countDown()", 1000);
}
function startit(){
if (document.all||document.getElementById)
document.write('Обновяване след: <b id="countDownText">'+countDownTime+' </b> сек.')
countDown()
}
if (document.all||document.getElementById)
startit()
</script>