아래와 같습니다. 코드를 복사하세요코드는 다음과 같습니다. < ;!-- HTML의 --> 사이에 다음 코드를 추가합니다. <br>함수 setcountdown(theyear,themonth,theday){<br>yr=theyear;mo=themonth;da=theday<br>}<br>setcountdown(2008, 7,12)<br>var event="2008 베이징 올림픽"<br>var message_on_occasion="드디어 기다리던 순간이 왔습니다!"<br>var countdownwidth='480px'<br>var countdownheight='20px' <br>var countdownbgcolor='tan'<br>var opentags='<fontface="宋体"><small>'<br>var closetags='</small></font>'<br>var Montharray=new Array("1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월 ","Dec")<br>var crosscount=''<br>function start_countdown(){<br>if (document.layers)<br>document.countdownnsmain.visibility="show"<br>else if (document .all||document.getElementById)<br>crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie<br>countdown()<br>}</p> <p>if (document.all||document.getElementById)<br>document.write('<span id="countdownie" style="width:' countdownwidth '; background-color:' countdownbgcolor '">< ;/스팬>')</p> <p>window.onload=start_countdown</p> <p><br>함수 카운트다운(){<br>var today=new Date()<br>var todayy=today.getYear()<br>if (todayy < 1000)<BR>todayy =1900<BR>var todaym=today.getMonth()<BR>var todayd=today.getDate()<BR>var todayh=today.getHours()<BR>var todaymin=today.getMinutes()<BR>var todaysec=today. getSeconds()<BR>var todaystring=montharray[todaym] " " todayd ", " todayy " " todayh ":" todaymin ":" todaysec<BR>futurestring=montharray[mo-1] " " da ", " yr<BR>dd=Date.parse(futurestring)-Date.parse(todaystring)<BR>dday=Math.floor(dd/(60*60*1000*24)*1)<BR>dhour=Math.floor(( dd%(60*60*1000*24))/(60*60*1000)*1)<BR>dmin=Math.floor(((dd%(60*60*1000*24))%(60* 60*1000))/(60*1000)*1)<BR>dsec=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))%(60 * 1000))/1000*1)<BR>if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){<BR>if (document.layers){<BR>document.countdownnsmain.document . countdownnssub.document.write(opentags message_on_occasion closetags)<BR>document.countdownnsmain.document.countdownnssub.document.close()<BR>}<BR>else if (document.all||document.getElementById)<BR>crosscount . innerHTML=opentags message_on_occasion closetags<BR>반환<BR>}<BR>else if (dday<=-1){<BR>if (document.layers){<BR>document.countdownnsmain.document.countdownnssub.document. (opentags "시간이 지났습니다!" closetags)<BR>document.countdownnsmain.document.countdownnssub.document.close()<BR>}<BR>else if (document.all||document.getElementById)<BR> 교차 계산. innerHTML=opentags "상황은 이미 지났습니다!" closetags<BR>return<BR>}<BR>else{<BR>if (document.layers){<BR>document.countdownnsmain.document.countdownnssub.document.write( opentags dday " 일, " dhour " 시간, " dmin " 분, " 기회 closetags까지 " dsec " 초 남음)<BR>document.countdownnsmain.document.countdownnssub.document.close()<BR>}<BR>else if ( document.all||document.getElementById)<BR>crosscount.innerHTML=opentags "및 " dday "일, " dhour " 시간, " dmin " 분, " dsec " 초는 " 기회 closetags입니다<BR>}<BR>setTimeout ("countdown()",1000)<BR>}<BR>< SCRIPT 언어="JavaScript"> height="&{countdownheight};" width="&{countdownwidth};"> ;LAYER id=countdownnssub height="&{countdownheight};" width="&{countdownwidth};" top="0" left="0">