¡Una cuenta regresiva JS muy útil! La cuenta regresiva de la página web en tiempo real, preciso hasta el segundo nivel, lo mismo que la cuenta regresiva del número de días. JS Countdown generalmente se usa para la compra grupal del sitio web del centro comercial, venta especial, ¡se pueden usar muchos lugares! ¡Espero ayudar a todos!
El efecto es el siguiente:
Copiar código del código de la siguiente manera:
<!
<html>
<Evista>
<meta http-oquiv = "content-type" content = "text /html; charset = utf-8" /> />
<Style type = "text/css">
.leave_time_font {margin-heft: 35%;}
#Fo {margen-izquierda: 32%;}
</style>
<title> woyaoni.cn- Countdown </title>
</ablo>
<Body>
<h1> woyaoni.cn </h1>
<script src = "./ jquery.js"> </script>
<script type = "text/javaScript">
$ (DOCUME) .Ready (function (e) {
var _CountSeconds = 0;
function_countdown () {
_CountSeconds ++;
$ ('input.surplustime').
var $ this = $ (this);
var _totaltime = number ($ this.val ()) -_countSeconds;
var _day = parseInt (_totaltime/86400);
var _Hours = parseInt (_totaltime%86400/3600);
var _mines = parseInt (_totaltime%86400%3600/60);
var _seconds = parseInt (_totaltime%86400%3600%60);
var _strlite = '<span>'+_ día+'</span> tian <span>'+_ horas+'</span> horas <span>'+_ minutos+'</span>> segundo';
var _str = 'Countdown:'+_ strlite;
if ($ this.next ('p.daojishi'). longitud> 0) {
$ this.next ('p.daojishi').
} else if ($ this.next ('p.leave_time_font'). Longitud> 0) {
$ this.next ('p.leave_time_font').
}
});
}
SetInterval (_CountDown, 1000);
})
</script>
</ablo>
<Body>
<?
ini_set ('date.timezone', 'Asia/Safehai');
$ CurrentTime = Time ();
$ a = strtotime ('2014-2-14 00:00');
$ B = $ A- $ CurrentTime;
? >>
<div id = "djs">
<div id = "fo"> Los pequeños amigos se quedan del día de San Valentín: </div>
<input type = "Hidden" name = "Surplustime" value = "<? Php echo $ b;?>" />
<p> <span> 0 </span> tian <span> 0 </span> horas <span> 0 </span> <span> 0 </span> segundo </p>
</div>
</body>
</html>