한국어
<!--이 효과를 얻으려면 세 단계가 필요합니다. 1단계: <head> 영역에 다음 코드를 추가합니다.--> <SCRIPT LANGUAGE="JavaScript"> <!-- 시작 var byear = 프롬프트('제발 태어난 연도를 입력하세요','1976'); var mm = 프롬프트('생년월일을 입력하세요','6') var bday = 프롬프트('생년월일을 입력하세요','10'); var year = new Date(); var year2 = year.getYear(); var year3 = (연도 < 2000) : year2 = thedate.getMonth() + 1; = thedate.getDate(); yy2 = thedate.getYear(); if (yy2 < 100) yy2 += 1900 yourage = yy2 - byear; if ((mm2 == mm) && ( dd2 < bday)) yourage--; TMonth = new Array( '1월','2월','3월', '4월','5월','6월','7월', '8월','9월' , '10월', '11월', '12월' ); bmonth = TMonth[CurMonth]; var age2 = yourage + 1; var today = new Date(); var startday = new Date(); var minPerDay = 0; var secsLeft = 0; ; var minRound = 0; var timeRemain = 0; function stopclock() { if(timerRunning)clearTimeout(timerID); 타이머실행 = false; ) ; } function showtime() { today = new Date(); enday = new Date(""+bmonth+", "+bday+" "+year3+" 00:00"); ) ; secsPerDay = 60 * 1000 ; hourPerDay = 60 * 60 * 1000; secsLeft = (enday.getTime() - today.getTime()) 수학 .round(secsLeft); secsRemain = secsLeft - secsRound; secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60; ( secsRemain); minLeft = ((enday.getTime() - today.getTime()) / hourPerDay); minRound = Math.round(minLeft); minRemain = (minRemain < 0) ? - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60); minRemain = Math.round(minRemain - 0.495); hourLeft = ((enday.getTime() - today.getTime()) / hourRound = Math.round(hoursLeft); hourRemain = hourLeft - hourRound; hourRemain = (hoursRemain < 0) ? hourRemain = 24 - ((hoursRound - hourLeft) * 24) : hourRemain = ((hoursLeft - hourRound) * 24 ); hourRemain = Math.round(hoursRemain - 0.5); daysLeft = ((enday.getTime() - today.getTime()) / PerDay); daysLeft = (daysLeft - 0.5); daysRound = Math.round(daysLeft); daysRound; if (daysRemain == 1) day_rem = " 일, " else day_rem = " 일, " if (hoursRemain == 1) hour_rem = " 시간, " else hour_rem = " 시간, " if (minRemain == 1 ) min_rem = " 분, " else min_rem = " 분, " if (secsRemain == 1) sec_rem = " 초" else sec_rem = " 초" timeRemain = daysRemain + day_rem + hourRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem; down.face.value = timeRemain; 타이머ID = setTimeout("showtime()",1000); 타이머런닝 = true; if (daysRemain < 0) year3 = year3 + 1 } function showtime1() { startday = new Date(" "+ bmonth+" "+bday+" 00:00 EDT"); startday.setYear(""+byear+""); today = new Date(); minPerDay = 60 * 1000; * 60 * 1000; PerDay = 24 * 60 * 60 * 1000; secsLeft = (today.getTime() - startday.getTime()) / minPerDay; secsRound = Math.round(secsLeft); (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60; secsRemain = Math.round(secsRemain) - startday .getTime()) / hourPerDay); minRound = Math.round(minLeft); minRemain = minLeft - minRound; minRemain = (minRemain < 0) ? minRemain = (( minLeft - minRound) * 60); minRemain = Math.round(minRemain - 0.495); hourLeft = ((today.getTime() - startday.getTime()) / PerDay); hourRound = Math.round(hoursLeft); hourLeft - hourRound; hourRemain = (hoursRemain < 0) ? hourRemain = 24 - ((hoursRound - hourLeft) * 24) : hourRemain = ((hoursLeft - hourRound) * 24); daysLeft = ((today.getTime() - startday.getTime()) / PerDay); daysLeft = (daysLeft - 0.5); daysRound = Math.round(daysLeft); daysRemain = daysRound; 일, " else day_rem = " 일, " if (hoursRemain == 1) hour_rem = " 시간, " else hour_rem = " 시간, " if (minRemain == 1) min_rem = " 분, " else min_rem = " 분 , " if (secsRemain == 1) sec_rem = " 초" else sec_rem = " 초" timeRemain = daysRemain + day_rem + hourRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem document.up.face.value = timeRemain; "showtime1()",1000); timeRunning = true; } // End --> </script> <!--2단계: <body> 영역에 다음 코드를 추가합니다--> <center> <form name ="down" onSubmit="0"> <script Language="JavaScript"> document.write("<b>생년월일: "+byear+" 년 "+mm+" 월 "+bday+" 일 . ("+ mm+"/"+bday+"/"+byear+")</b>"); document.write("<br><br>올해 당신은 "+yourage+"살이고 "+age2+"입니다. 연도:"); </script> <br> <input type="text" name="face" size="47" value="JavaScript 1.1+를 지원하는 브라우저가 필요합니다."> </form> <p > <br> <form name="up" onSubmit="1"> 당신이 이 세상에서 살 수 있는 기간은 다음과 같습니다.<br> <input type="text" name="face" size="47" value= " JavaScript 1.1+를 지원하는 브라우저가 필요합니다."> </form> </center> <!--3단계: <body> 태그에 "OnLoad="startclock()""을 추가합니다. 예: --> < 바디 OnLoad="startclock()">