|
|
Ŭ¶ó¿ìµåű×
Javascript PHP ASP CSS HTML MYSQL jquery image Mobile API slide °Ô½ÃÆÇ ¸Þ´º
|
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
|
Ä«¿îŸ¾÷-´Ù¿î |
|
|
|
|
¼Ò½ººÐ·ù |
½Ã°£,³¯Â¥ |
|
|
´Ù¿î·Îµå Ƚ¼ö |
970 ȸ |
|
|
|
°£´Ü¼³¸í |
Ä«¿îÆ® ´Ù¿î°ú Ä«¿îÆ® ¾÷À» µ¿½Ã¿¡..º¸¿äÁÝ´Ï´Ù. |
|
|
|
|
|
<SCRIPT Language="JavaScript"><br />
/* ÃʱâÈ */<br />
var timerID;<br />
var timerRunning = false;<br />
var today = new Date();<br />
var startday = new Date();<br />
var enday = new Date();<br />
var secPerDay = 0;<br />
var minPerDay = 0;<br />
var hourPerDay = 0;<br />
var secsLeft = 0;<br />
var secsRound = 0;<br />
var secsRemain = 0;<br />
var minLeft = 0;<br />
var minRound = 0;<br />
var minRemain = 0;<br />
var timeRemain = 0;<br />
<br />
<br />
/* ŸÀÌ¸Ó Á¤Áö */<br />
<br />
function stopclock(){<br />
if(timerRunning)<br />
clearTimeout(timerID);<br />
timerRunning = false;<br />
}<br />
<br />
/* ŸÀÌ¸Ó ½ÃÀÛ */<br />
<br />
function startclock() {<br />
stopclock();<br />
showtime();<br />
showtime1();<br />
}<br />
<br />
/* Ä«¿îÆ® ´Ù¿î ŸÀÌ¸Ó ºÎºÐ */<br />
<br />
function showtime() {<br />
today = new Date();<br />
enday = new Date("December 25, 2001 00:00"); // D-day<br />
enday.setYear("2001");<br />
secsPerDay = 1000 ;<br />
minPerDay = 60 * 1000 ;<br />
hoursPerDay = 60 * 60 * 1000;<br />
PerDay = 24 * 60 * 60 * 1000;<br />
<br />
/* ÃÊ */<br />
<br />
secsLeft = (enday.getTime() - today.getTime()) / minPerDay;<br />
secsRound = Math.round(secsLeft);<br />
secsRemain = secsLeft - secsRound;<br />
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound -<br />
secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;<br />
secsRemain = Math.round(secsRemain);<br />
<br />
/* ºÐ */<br />
<br />
minLeft = ((enday.getTime() - today.getTime()) / hoursPerDay);<br />
minRound = Math.round(minLeft);<br />
minRemain = minLeft - minRound;<br />
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) *<br />
60) : minRemain = ((minLeft - minRound) * 60);<br />
minRemain = Math.round(minRemain - 0.495);<br />
<br />
/* ½Ã */<br />
<br />
hoursLeft = ((enday.getTime() - today.getTime()) / PerDay);<br />
hoursRound = Math.round(hoursLeft);<br />
hoursRemain = hoursLeft - hoursRound;<br />
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound -<br />
hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);<br />
hoursRemain = Math.round(hoursRemain - 0.5);<br />
<br />
/* ³¯Â¥ */<br />
<br />
daysLeft = ((enday.getTime() - today.getTime()) / PerDay);<br />
daysLeft = (daysLeft - 0.5);<br />
daysRound = Math.round(daysLeft);<br />
daysRemain = daysRound;<br />
<br />
/* ½Ã°£Ç¥½Ã */<br />
<br />
day_rem = " ÀÏ, "<br />
hour_rem = " ½Ã°£, "<br />
min_rem = " ºÐ, "<br />
sec_rem = " ÃÊ"<br />
<br />
timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain +<br />
min_rem + secsRemain + sec_rem;<br />
document.down.age.value = timeRemain;<br />
timerID = setTimeout("showtime()",1000);<br />
timerRunning = true;<br />
if (daysRemain < 0) {<br />
clearTimeout(timerID);<br />
timerRunning = false;<br />
document.down.age.value = "D-day Ä«¿îÆ®´Ù¿îÀÌ ³¡³µ½À´Ï´Ù";<br />
}<br />
}<br />
<br />
<br />
/* Ä«¿îÆ® ¾÷ ºÎºÐ */<br />
<br />
function showtime1() {<br />
startday = new Date("March 01, 1970 15:03"); // Ä«¿îÆ®¾÷ Ãâ¹ß ½Ã°£<br />
startday.setYear("1970");<br />
today = new Date();<br />
secsPerDay = 1000 ;<br />
minPerDay = 60 * 1000 ;<br />
hoursPerDay = 60 * 60 * 1000;<br />
PerDay = 24 * 60 * 60 * 1000;<br />
<br />
/* ÃÊ */<br />
secsLeft = (today.getTime() - startday.getTime()) / minPerDay;<br />
secsRound = Math.round(secsLeft);<br />
secsRemain = secsLeft - secsRound;<br />
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound -<br />
secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;<br />
secsRemain = Math.round(secsRemain);<br />
<br />
/* ºÐ */<br />
minLeft = ((today.getTime() - startday.getTime()) / hoursPerDay);<br />
minRound = Math.round(minLeft);<br />
minRemain = minLeft - minRound;<br />
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) *<br />
60) : minRemain = ((minLeft - minRound) * 60);<br />
minRemain = Math.round(minRemain - 0.495);<br />
<br />
/* ½Ã */<br />
hoursLeft = ((today.getTime() - startday.getTime()) / PerDay);<br />
hoursRound = Math.round(hoursLeft);<br />
hoursRemain = hoursLeft - hoursRound;<br />
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound -<br />
hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);<br />
hoursRemain = Math.round(hoursRemain - 0.5);<br />
<br />
/* ÀÏ */<br />
daysLeft = ((today.getTime() - startday.getTime()) / PerDay);<br />
daysLeft = (daysLeft - 0.5);<br />
daysRound = Math.round(daysLeft);<br />
daysRemain = daysRound;<br />
<br />
/* ½Ã°£Ç¥½Ã */<br />
<br />
day_rem = " ÀÏ, "<br />
hour_rem = " ½Ã°£, "<br />
min_rem = " ºÐ, "<br />
sec_rem = " ÃÊ"<br />
<br />
timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain +<br />
min_rem + secsRemain + sec_rem;<br />
document.up.age.value = timeRemain;<br />
timerID = setTimeout("showtime1()",1000);<br />
timerRunning = true;<br />
}<br />
// --><br />
<br />
</SCRIPT>
|
|
³×ƼÁð ÀÇ°ß ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.) |
|