|
|
Ŭ¶ó¿ìµåű×
Javascript php ASP CSS HTML MYSQL jquery image API Mobile ¸Þ´º slide °Ô½ÃÆÇ
|
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
|
±×³à¸¦ ¸¸³Áö |
|
|
|
|
¼Ò½ººÐ·ù |
½Ã°£,³¯Â¥ |
|
|
´Ù¿î·Îµå Ƚ¼ö |
523 ȸ |
|
|
|
°£´Ü¼³¸í |
Á¤ÇØÁø ½Ã°£¿¡ ´ëÇÏ¿© ¸î ÀÏÀÌ Áö³µ´ÂÁö, ½Ã°£ ºÐ ÃʱîÁö ³ªÅ¸³»ÁÝ´Ï´Ù. |
|
|
|
|
|
A
<SCRIPT Language="JavaScript1.1"><br />
var timerID;<br />
var timerRunning = false;<br />
var today = new Date();<br />
var startday = 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 />
/* This function will stop the clock */<br />
<br />
function stopclock(){<br />
if(timerRunning)<br />
clearTimeout(timerID);<br />
timerRunning = false;<br />
}<br />
<br />
/* This function will start the clock */<br />
<br />
function startclock() {<br />
stopclock();<br />
showtime1();<br />
}<br />
<br />
<br />
/* This function will display the count-up */<br />
<br />
function showtime1() {<br />
startday = new Date("September 19,1998 00:00 EDT"); // Ãâ¹ß½ËÁ¡À» ÀÔ·ÂÇϼ¼¿ä<br />
startday.setYear("1998"); // Ãâ¹ß³âµµ¸¦ ÀÔ·ÂÇϼ¼¿ä<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 />
/* Seconds */<br />
<br />
secsLeft = (today.getTime() - startday.getTime()) / minPerDay;<br />
<br />
secsRound = Math.round(secsLeft);<br />
<br />
secsRemain = secsLeft - secsRound;<br />
<br />
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;<br />
<br />
secsRemain = Math.round(secsRemain);<br />
<br />
<br />
/* Minutes */<br />
<br />
minLeft = ((today.getTime() - startday.getTime()) / hoursPerDay);<br />
<br />
minRound = Math.round(minLeft);<br />
<br />
minRemain = minLeft - minRound;<br />
<br />
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60);<br />
<br />
minRemain = Math.round(minRemain - 0.495);<br />
<br />
<br />
/* Hours */<br />
<br />
hoursLeft = ((today.getTime() - startday.getTime()) / PerDay);<br />
<br />
hoursRound = Math.round(hoursLeft);<br />
<br />
hoursRemain = hoursLeft - hoursRound;<br />
<br />
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);<br />
<br />
hoursRemain = Math.round(hoursRemain - 0.5);<br />
<br />
<br />
/* Days */<br />
<br />
daysLeft = ((today.getTime() - startday.getTime()) / PerDay);<br />
<br />
daysLeft = (daysLeft - 0.5);<br />
<br />
daysRound = Math.round(daysLeft);<br />
<br />
daysRemain = daysRound;<br />
<br />
<br />
/* Time */<br />
<br />
if (daysRemain == 1) <br />
{<br />
day_rem = " ÀÏ, "<br />
}<br />
else<br />
{<br />
day_rem = " ÀÏ, "<br />
}<br />
<br />
if (hoursRemain == 1) <br />
{<br />
hour_rem = " ½Ã°£, "<br />
}<br />
else<br />
{<br />
hour_rem = " ½Ã°£, "<br />
}<br />
<br />
if (minRemain == 1) <br />
{<br />
min_rem = " ºÐ, "<br />
}<br />
else<br />
{<br />
min_rem = " ºÐ, "<br />
}<br />
<br />
if (secsRemain == 1) <br />
{<br />
sec_rem = " ÃÊ"<br />
}<br />
else<br />
{<br />
sec_rem = " ÃÊ"<br />
}<br />
<br />
timeRemain = "±×³à¸¦ ¸¸³Áö " + daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem + " °¡ µÇ¾ú³×¿ä";<br />
<br />
<br />
document.up.face.value = timeRemain;<br />
timerID = setTimeout("showtime1()",1000);<br />
timerRunning = true;<br />
<br />
}<br />
<br />
// end hiding contents from old browsers --><br />
</SCRIPT>
|
|
³×ƼÁð ÀÇ°ß ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.) |
|