home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn WWW 1999 July
/
www_07_1999.iso
/
prez
/
amiga
/
KidHTML1_25.lha
/
KidHTML1.25
/
Script
/
timestamp.js
< prev
Wrap
Text File
|
1998-08-25
|
933b
|
44 lines
<!-- ONE STEP TO INSTALL DATE & TIME STAMP:
1. Paste the coding into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the BODY of your HTML document -->
<BODY>
<CENTER>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available online from -->
<!-- The JavaScript Source!! http://javascriptsource.com -->
<!-- Begin
Stamp = new Date();
document.write('<font size="2" face="Arial"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getYear() + '</B></font><BR>');
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}
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"><B>' + Hours + ":" + Mins + Time + '</B></font>');
// End -->
</SCRIPT>
</CENTER>
<!-- Script Size: 0.97 KB -->