¼îÇθô¿¡¼ ¿À´Ã¸¸Æ¯°¡·Î ¿øµ¥ÀÌ Ä«¿îÅÍ ±â´ÉÀ» ³ÖÀ¸·Á°í Çϴµ¥,
js¸¦ ºÒ·¯¿Í¼ script ³Ö°í ÀÏ´Ü ¸ÂÃç´Â ³ù´Âµ¥.. »õ·Î°íħÀ» ÇÒ ¶§¸¶´Ù Ä«¿îÅÍ°¡ ÃʱâÈ°¡ µÇ³×¿ä.
ÆäÀÌÁö´Â www.elishacoy.co¿¡¼ Áß¾Ó ¿À¸¥ÂʺκÐÀε¥,
html˼
<script language="JavaScript" type="text/javascript" src="http://www.elishacoy.co/design/elishacoy1/image/just1day.js"></script>
< script language="javascript">
< !--
window.onload=countdown
var yr = "2013";
var mo = "04";
var da = "12";
var tmp_hh = "99";
var tmp_mm = "99";
var tmp_ss = "99";
var minus_second = 0;
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var today=new Date(2013, 3, 11, 1, 0, 00);
//var today=new Date(2013, 3, 11, 19, 7, 48);
//-->
< /script>
jsÆÄÀÏÀº ¾Æ·¡¿Í °°½À´Ï´Ù.
function countdown(){
today = new Date(Date.parse(today) + (1000+minus_second)); //¼¹ö½Ã°£¿¡ 1Ãʾ¿ Áõ°¡
var todayy=today.getYear()
if(todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[mo-1]+" "+da+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
if(dday < 0)
{
document.getElementById("timerdivnow").style.display = "none";
document.getElementById("timerdivend").style.display = "block";
}
//alert(dhour);
if(dhour < 10)
{
dhour = "0" + dhour;
}
if(dmin < 10)
{
dmin = "0" + dmin;
}
if(dsec < 10)
{
dsec = "0" + dsec;
}
if(tmp_hh != dhour)
{
if(String(tmp_hh).substring(0,1) != String(dhour).substring(0,1))
{
fnPutNumImg("hour1",String(dhour).substring(0,1),"h1");
}
fnPutNumImg("hour2",String(dhour).substring(2,1),"h2");
}
if(tmp_mm != dmin)
{
if(String(tmp_mm).substring(0,1) != String(dmin).substring(0,1))
{
fnPutNumImg("minute1",String(dmin).substring(0,1),"m1");
}
fnPutNumImg("minute2",String(dmin).substring(2,1),"m2");
}
if(String(tmp_ss).substring(0,1) != String(dsec).substring(0,1))
{
fnPutNumImg("second1",String(dsec).substring(0,1),"s1");
}
fnPutNumImg("second2",String(dsec).substring(2,1),"s2");
tmp_hh = dhour;
tmp_mm = dmin;
tmp_ss = dsec;
minus_second = minus_second + 1;
setTimeout("countdown()",1000)
}
function fnPutNumImg(fitm,no,param) {
var frm = document.getElementById(fitm);
frm.src="http://www.elishacoy.co/design/elishacoy1/image/timer_" + no + ".gif?t="+param+"";
}
¾îµð¸¦ ¼öÁ¤ÇؾßÇϴ°ɱî¿ä.... ²À ´äº¯ ºÎŹµå¸³´Ï´Ù~