(10 дек 2015, 23:46) (
0/
0)
[
0]
Drol,
<?php
$tim=0;
?>
<script type='text/javascript'>
function timer(){
var obj=document.getElementById('timer_inp');
obj.innerHTML++;
if(obj.innerHTML==60){
location.href = '/';//путь, куда отправляем при таймере 60
setTimeout(function(){},1000);
}else{
setTimeout(timer,1000);
}
}
setTimeout(timer,1000);
</script>
<span id="timer_inp"><?=$tim?></span>