예를 들면 AAA. txt-> aaa.html 입니다
& lt! Doctype html public "-//W3C//dtd html 4.01transitional//en"
"http://www.w3.org/tr/html4/loose.dtd" >
& lthtml & gt
& lthead & gt
& ltmeta http-equiv = "content-type" content = "text/html; Charset=gb23 12 ">
& lttitle & gt 날짜
& lt 스크립팅 언어 = "자바스크립트">
함수 표시 ()
{
Var x = newdate ();
Var y = x.getyear (); //년
Var m = x.getmonth (); //월
Var d = x.getday (); //주
Var ds = x.getdate (); //일
Var h = x.gethours (); //시간
Varm1= x.getminutes (); //분
Var s = x.getseconds (); //초
Var 일;
If (x.getday () = = 0) day = "Sunday";
If (x.getday () = =1) day = "Monday";
If (x.getday () = = 2) day = "Tuesday";
If (x.getDay()==3) day= "수요일";
If (x.getDay()==4) day= "목요일";
If (x.getday () = = 5) day = "Friday";
If (x.getDay()==6) day= "토요일";
Var timer = ""+((h > 12)? H-12: h);
Timer+= ((m1< 10)? ":0": ")+m1;
Timer+= ((s < 10)? ":0":: ")+s;
Timer+= ""+((h > = 12)? "pm": "am");
Document.s1.b1.value = y;
Document.s1.B2. value = m+1;
Document.s1.b3.value = ds;
Document.s1.b4.value = timer;
Document.s1.b5.value = day;
SetTimeout("show () ",1000);
}
& lt/스크립트 >
& lt/head & gt;;
& & ltbody onload = "show()" & gt;;
& lt formname = "s1"onsubmit = "0" >
오늘
& ltbr & gt& ltBR & gt
현재 시간:
& lt input type = "text" name = "B2" size = "5" > 달
& lt input type = "text" name = "B3" size = "5" > 태양
& lt input type = "text" name = "B4" size = "15" >
& lt/form & gt;;
& lt/body & gt;;
& lt/html & gt;;
건물 주인에게 유용하기를 바랍니다.