한국어
<!-- 完整的HTML代码如下--> <HTML> <TITLE>建站school院特效代码->>24/12 转换时钟</TITLE> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- 시작 function showMilitaryTime() { if (document.form.showMilitary[0].checked) { return true; } 거짓을 반환; } function showTheHours(theHour) { if (showMilitaryTime() || (theHour > 0 && theHour < 13)) { return (theHour); } if (theHour == 0) { return (12); } return (theHour-12); } 함수 showZeroFilled(inValue) { if (inValue > 9) { return "" + inValue; } "0" + inValue를 반환합니다. } 함수 showAmPm() { if (showMilitaryTime()) { return (""); } if (now.getHours() < 12) { return (" 오전"); } return (" 오후"); } function showTheTime() { now = new Date document.form.showTime.value = showTheHours(now.getHours()) + ":" + showZeroFilled(now.getMinutes()) + ":" + showZeroFilled(now.getSeconds( )) + showAmPm() setTimeout("showTheTime()",1000) } // End --> </script> <BODY onLoad="showTheTime()"> <!-- 3단계: HTML 문서의 BODY --> <BODY> <center><form name=form> <input type=text name=showTime size=11><p> <input type=radio name=showMilitary selected>24작은<br> <input type=radio name=showMilitary>12소수<br> </form></center>