{% else-1 %}
(11 сен 2014, 21:45) (1/0) [1]
[code]<div id="timer">30</div>
<script>window.onload = function () {
jstimer();
}
function jstimer() {
var i = document.getElementById('timer').innerHTML;
function get() {

if(i>0) {
i--;
document.getElementById('timer').innerHTML = i;
}
if (i==0) {
clearInterval(gettimer);
}

}
var gettimer = SetInterval(get, 1000);
}



</script>[/code]
  • 1 из 1