�Ҵ�Ẻ��� 2 �ѹ�Ф�Ѻ
��������ҵ�ҧ�
<script language="JavaScript"> now = new Date(); hours = now.getHours() if ((hours>=0) && (hours<5)) { document.write ("<b>" + "�֡�ҡ���ǹФ� �ѧ����ա���ͤ�" + "</b>");} if ((hours>=5) && (hours<12)) { document.write ("<b>" + "��س���ʴ����" + "</b>");} if ((hours>=12) && (hours<18)) { document.write ("<b>" + "���ʴյ���¤��" + "</b>");} if ((hours>=18) && (hours<24)) { document.write ("<b>" + "���ʴյ��繤��" + "</b>");} document.write( "<br>"+" ��й�������� : " + now.getHours() + ":" + now.getMinutes()); document.write("<br>" + "�ѹ��� : " + (now.getMonth()+1)+ " / " + now.getDate() + " / " + (1900+ now.getYear())); </script> |
|
<script language="javascript"> <!-- hide javascript document.write("<CENTER><STRONG><FONT FACE=AngsanaUPC size=6 COLOR=RED>"); day = new Date(); hr = day.getHours(); if ((hr >= 1) && (hr <=5)) { wd = "���ʴյ����״��Ѻ ��Т͵��Ѻ���";} if ((hr >= 6) && (hr <=9)) { wd = "���ʴյ��Ҥ�Ѻ ��Т͵��Ѻ������";} if ((hr >= 10) && (hr <=11)) { wd = "���ʴյ��¤�Ѻ ��Т͵��Ѻ������";} if ((hr >= 12) && (hr <=16)) { wd = "���ʴյ���¤�Ѻ ��Т͵��Ѻ������";} if ((hr >= 17) && (hr <=19)) { wd = "���ʴյ��Ӥ�Ѻ ��Т͵��Ѻ������";} if ((hr >= 20) && (hr <=22)) { wd = "���ʴյ��Ӥ�Ѻ ��Т͵��Ѻ������";} if ((hr >23) && (hr <=24)) { wd = "���ʴյ�֡��Ѻ ��Т͵��Ѻ������";} if (hr==0) { wd = "���ʴյ���§���Ѻ ��Т͵��Ѻ������";} document.write(wd); document.write("</FONT></STRONG></CENTER>"); // done hiding --> </script> |
|
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin var days = new Array("�ҷԵ��","�ѹ���","�ѧ���","�ظ","����ʺ��","�ء��","�����"); var months = new Array("���Ҥ�","����Ҿѹ��","�չҤ�","����¹","����Ҥ�","�Զع�¹", "�á�Ҥ�","�ԧ�Ҥ�","�ѹ��¹","���Ҥ�","��Ȩԡ�¹","�ѹ�Ҥ�"); // This lint for Last Modified //var dateObj = new Date(document.lastModified) // This line for Today date var dateObj = new Date() var wday = days[dateObj.getDay()] var lmonth = months[dateObj.getMonth()] var date = dateObj.getDate() var fyear = (543+(1900 + dateObj.getYear())) document.write('<center><font FACE="AngsanaUPC" SIZE=6 COLOR=red>') document.write('�ѹ��� �ѹ'+wday + ' ��� ' +date+' '+ lmonth+' '+ fyear) document.write('</font></center>') // End --> </SCRIPT> |
|
<form name="clock2"> ---------------------------------------------------------- <input type="text" name="clock" value="" size=5> -------------------------------------------------------- </form> ---------------------------------------------------------- <SCRIPT> function liveclock(){ var curdate=new Date() var hours=curdate.getHours() var minutes=curdate.getMinutes() var seconds=curdate.getSeconds() var suffix="AM" if (hours>=12){ suffix="PM" if (hours>=13) hours-=12} if (minutes<10) minutes="0"+minutes if (seconds<10) seconds="0"+seconds var thetime=hours+":"+minutes+":"+seconds+" "+suffix document.time.time2.value=thetime setTimeout("liveclock()",1000)} liveclock() </SCRIPT> |
|
<SCRIPT LANGUAGE="JavaScript"> <!-- Start now= new Date(); document.write("<FONT face='CordiaUPC,AngsanaUPC,Thonburi,FixedDB ThaiText New' size=+1 color=Red>"); document.write("�ѹ���: " + now.getDate() + "/" + (now.getMonth() + 1) + "/" + (543+(1900 + now.getYear()))); document.write("<br>"+"����: " + now.getHours() + ":" + now.getMinutes() + "</font><br>"); //--> </SCRIPT> |
|
| <SCRIPT LANGUAGE="JavaScript"> <!-- hide var timeStr, dateStr; function clock() { now= new Date(); // time hours= now.getHours(); minutes= now.getMinutes(); seconds= now.getSeconds(); timeStr= "" + hours; timeStr+= ((minutes < 10) ? ":0" : ":") + minutes; timeStr+= ((seconds < 10) ? ":0" : ":") + seconds; document.clock.time.value = timeStr; // date date= now.getDate(); month= now.getMonth()+1; year= now.getYear()-57; dateStr = "" + ((date < 10) ? "0" : "") + date; dateStr+= "/" + month; dateStr+= "/" + year; document.clock.date.value = dateStr; Timer= setTimeout("clock()",1000);} // --> </SCRIPT> <BODY onLoad="clock()"> <FORM NAME="clock"> <input type="text" name="date" size="8" value=""></br> <input type="text" name="time" size="8" value=""></br></form> |