<html>
<body onLoad="CalcRemaining(document.clock)">
<script language="JavaScript">
<!--- hide
var worldcup = new Date("APRIL 30, 2007 18:00:00")
function CalcRemaining(theForm)
{
var now = new Date();

var difference = parseInt(((worldcup.getTime() - now.getTime()) / 1000) + 0.999)
if (difference >0) {
var secs = difference % 60

difference = parseInt(difference / 60)
var minutes = difference % 60

difference = parseInt(difference / 60)
var hours = difference % 24

difference = parseInt(difference / 24)
var days = difference
var texts = '공동구매가 진행중입니다.';
} else {
var days = '0';
var hours = '0';
var minutes = '0';
var secs = '0';
var texts = '공동구매가 마감되었습니다.';
}

theForm.txtDays.value = days;
theForm.txtHours.value = hours;
theForm.txtMins.value = minutes;
theForm.txtSecs.value = secs;
theForm.txtTexts.value = texts;

setTimeout("CalcRemaining(document.clock)", 250);

}
// end hiding -->
</script>
<form name=clock>
<input type=TEXT name=txtDays size=4 onFocus="blur()">일
<input type=TEXT name=txtHours size=4 onFocus="blur()">시간
<input type=TEXT name=txtMins size=4 onFocus="blur()">분
<input type=TEXT name=txtSecs size=4 onFocus="blur()">초<br>
<input type=TEXT name=txtTexts size=35 onFocus="blur()">
</form>
</body>
</html>

유사한 주제의 글들을 살펴보세요:

, , , , , ,

Latest Comment

티스토리 툴바