|
|
Ŭ¶ó¿ìµåű×
Javascript PHP asp CSS html mysql jquery image Mobile API slide °Ô½ÃÆÇ ¸Þ´º
|
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
|
³¸îÀÏÀ»»ì°íÀÖÀ»±î? |
|
|
|
|
¼Ò½ººÐ·ù |
½Ã°£,³¯Â¥ |
|
|
´Ù¿î·Îµå Ƚ¼ö |
1378 ȸ |
|
|
|
°£´Ü¼³¸í |
ÀÚ½ÅÀÌ ÅÂ¾î³ ³¯Â¥¸¦ ÀÔ·ÂÇÏ¸é ¸î Àϵ¿¾È »ì¾Æ¿Ô´ÂÁö ¾Ë¼ö ÀÖ´Ù. |
|
|
|
|
|
<SCRIPT LANGUAGE="JavaScript"><br />
<!-- Begin<br />
var mm = prompt(``´ç½ÅÀº ¸î¿ù¿¡ ź»ý Çϼ̳ª¿ä?``,``1-12``);<br />
var bday = prompt(``¸îÀÏ¿¡?``,``1-31``);<br />
var byear = prompt(``ÅÂ¾î³ ¿¬µµ´Â?``,``1975``);<br />
var year = new Date();<br />
var year2 = year.getYear();<br />
var year3 = (year < 2000) ? year2 + 1900 : year2;<br />
thedate = new Date();<br />
mm2 = thedate.getMonth() + 1;<br />
dd2 = thedate.getDate();<br />
yy2 = thedate.getYear();<br />
if (yy2 < 100) yy2 += 1900<br />
yourage = yy2 - byear;<br />
if (mm2 < mm) yourage--;<br />
if ((mm2 == mm) && (dd2 < bday)) yourage--;<br />
TMonth = new Array(<br />
``January``,``February``,``March``,<br />
``April``,``May``,``June``,``July``,<br />
``August``,``September``,``October``,<br />
``November``,``December``<br />
);<br />
CurMonth = mm - 1;<br />
bmonth = TMonth[CurMonth];<br />
var age2 = yourage + 1;<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 />
function stopclock() {<br />
if(timerRunning)<br />
clearTimeout(timerID);<br />
timerRunning = false;<br />
}<br />
function startclock() {<br />
stopclock();<br />
showtime();<br />
showtime1();<br />
}<br />
function showtime() {<br />
today = new Date();<br />
enday = new Date(""+bmonth+", "+bday+" "+year3+" 00:00");<br />
enday.setYear(""+year3+"");<br />
secsPerDay = 1000 ;<br />
minPerDay = 60 * 1000 ;<br />
hoursPerDay = 60 * 60 * 1000;<br />
PerDay = 24 * 60 * 60 * 1000;<br />
secsLeft = (enday.getTime() - today.getTime()) / minPerDay;<br />
secsRound = Math.round(secsLeft);<br />
secsRemain = secsLeft - secsRound;<br />
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;<br />
secsRemain = Math.round(secsRemain);<br />
minLeft = ((enday.getTime() - today.getTime()) / hoursPerDay);<br />
minRound = Math.round(minLeft);<br />
minRemain = minLeft - minRound;<br />
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60);<br />
minRemain = Math.round(minRemain - 0.495);<br />
hoursLeft = ((enday.getTime() - today.getTime()) / PerDay);<br />
hoursRound = Math.round(hoursLeft);<br />
hoursRemain = hoursLeft - hoursRound;<br />
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);<br />
hoursRemain = Math.round(hoursRemain - 0.5);<br />
daysLeft = ((enday.getTime() - today.getTime()) / PerDay);<br />
daysLeft = (daysLeft - 0.5);<br />
daysRound = Math.round(daysLeft);<br />
daysRemain = daysRound;<br />
if (daysRemain == 1) day_rem = " day, "<br />
else day_rem = " days, "<br />
if (hoursRemain == 1) hour_rem = " hour, "<br />
else hour_rem = " hours, "<br />
if (minRemain == 1) min_rem = " minute, "<br />
else min_rem = " minutes, "<br />
if (secsRemain == 1) sec_rem = " second"<br />
else sec_rem = " seconds"<br />
timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem;<br />
document.down.face.value = timeRemain;<br />
timerID = setTimeout("showtime()",1000);<br />
timerRunning = true;<br />
if (daysRemain < 0) year3 = year3 + 1<br />
}<br />
function showtime1() {<br />
startday = new Date(""+bmonth+" "+bday+", "+byear+" 00:00 EDT");<br />
startday.setYear(""+byear+"");<br />
today = new Date();<br />
secsPerDay = 1000 ;<br />
minPerDay = 60 * 1000 ;<br />
hoursPerDay = 60 * 60 * 1000;<br />
PerDay = 24 * 60 * 60 * 1000;<br />
secsLeft = (today.getTime() - startday.getTime()) / minPerDay;<br />
secsRound = Math.round(secsLeft);<br />
secsRemain = secsLeft - secsRound;<br />
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;<br />
secsRemain = Math.round(secsRemain);<br />
minLeft = ((today.getTime() - startday.getTime()) / hoursPerDay);<br />
minRound = Math.round(minLeft);<br />
minRemain = minLeft - minRound;<br />
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60);<br />
minRemain = Math.round(minRemain - 0.495);<br />
hoursLeft = ((today.getTime() - startday.getTime()) / PerDay);<br />
hoursRound = Math.round(hoursLeft);<br />
hoursRemain = hoursLeft - hoursRound;<br />
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);<br />
hoursRemain = Math.round(hoursRemain - 0.5);<br />
daysLeft = ((today.getTime() - startday.getTime()) / PerDay);<br />
daysLeft = (daysLeft - 0.5);<br />
daysRound = Math.round(daysLeft);<br />
daysRemain = daysRound;<br />
if (daysRemain == 1) day_rem = " day, "<br />
else day_rem = " days, "<br />
if (hoursRemain == 1) hour_rem = " hour, "<br />
else hour_rem = " hours, "<br />
if (minRemain == 1) min_rem = " minute, "<br />
else min_rem = " minutes, "<br />
if (secsRemain == 1) sec_rem = " second"<br />
else sec_rem = " seconds"<br />
timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem;<br />
document.up.face.value = timeRemain;<br />
timerID = setTimeout("showtime1()",1000);<br />
timerRunning = true;<br />
}<br />
// End --><br />
</script>
|
|
³×ƼÁð ÀÇ°ß ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.) |
|