(1 мар 2016, 15:19) (
0/
0)
[
0]
[code]
<script>
function timer(id)
var timer_int = parseFloat(document.getElementByid(id).innerHTML);
if (timer_div > 0 ) {
document.getElementByid(id).innerHTML = timer_int - 1;
setTimeout(function(){ timer(id); }, 1000);
} else {
document.getElementByid(id).innerHTML = 'Время вышло';
setTimeout('window.location.reload()', 1000);
}
}
timer('timer_inp');
</script>
[/code]