※ 日期與時間 ※
|
<script language="JavaScript"> <!-- Stamp = new Date(); document.write('<font size="2" face="Arial,Geneva,Sans Serif"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getYear() + '</B></font><BR>'); var Hours; var Mins; var Time; Hours = Stamp.getHours(); if (Hours >= 12) { Time = " PM."; } else { Time = " AM."; } if (Hours > 12) { Hours -= 12; } if (Hours == 0) { Hours = 12; } Mins = Stamp.getMinutes(); if (Mins < 10) { Mins = "0" + Mins; } document.write('<font size="2" face="Arial,Geneva,Sans Serif"><B>' + Hours + ":" + Mins + Time + '</B></font>'); // --> </script> |