매우 유용한 JS 카운트 다운! 웹 페이지 카운트 다운은 실시간으로, 두 번째 레벨에서 정확한 일일 수의 카운트 다운과 동일합니다. JS Countdown은 일반적으로 Mall 웹 사이트의 그룹 구매에 사용됩니다. 특별 판매, 많은 장소를 사용할 수 있습니다! 모두를 돕기를 바랍니다!
효과는 다음과 같습니다.
다음과 같이 코드 코드를 복사하십시오.
<doctype html>
<html>
<헤드>
<meta http-equiv = "content-type"content = "text /html; charset = utf-8" /> />
<스타일 유형 = "텍스트/CSS">
.Leave_Time_Font {마진-heft : 35%;}
#fo {마진-왼쪽 : 32%;}
</스타일>
<title> woyaoni.cn- 카운트 다운 </title>
</head>
<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 _minutes = parseint (_totaltime%86400%3600/60);
var _seconds = parseint (_totaltime%86400%3600%60);
var _strlite = '<pan>'+_ day+'</span> tian <span>'+_ 시간+'</span> 시간 <span>'+_ mings+'</span>> second';
var _str = 'countdown :'+_ strlite;
if ($ this.next ( 'p.daojishi'). length> 0) {
$ this.next ( 'p.daojishi');
} else if ($ this.next ( 'p.Leave_Time_Font'). 길이> 0) {
$ this.next ( 'P.Leave_Time_Font');
}
});
}
setInterval (_countdown, 1000);
})
</스크립트>
</head>
<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"> 작은 친구들은 발렌타인 데이에서 남겨졌습니다 : </div>
<입력 유형 = "hidden"name = "supplustime"value = "<? php echo $ b;?>" />
<p> <span> 0 </span> tian <span> 0 </span> 시간 <span> 0 </span> <span> 0 </span> second </p>
</div>
</body>
</html>