Page Details >>> Time Box.
 
Script Categories













Page Details >>> Time Box.

This is a neat little script that makes your web page look a whole lot more professional. This JavaScript will display a small box with the time the visitor loaded the page.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var Temp;
setClock();
function setClock() {
Temp = "";
now = new Date();
var CurHour = now.getHours();
var CurMinute = now.getMinutes();
now = null;
if( CurHour >= 12) {
ampm = 1;
}
else
ampm = 0;
if( CurHour > 12 ) {
CurHour = CurHour - 12;
}
if( CurHour == 0 )
CurHour = 12;
if( CurMinute < 10 )
CurMinute = "0" + CurMinute;
CurHour = "<FONT SIZE=2><B>" + CurHour + ":" + CurMinute + "</B>";
if( ampm == 1 )
CurHour = CurHour + " P.M.";
else
CurHour = CurHour + " A.M.";
Temp = CurHour;
}
function pathOnly (InString)  {
LastSlash=InString.lastIndexOf ('/', InString.length-1)
OutString=InString.substring  (0, LastSlash+1)
return (OutString);
}
// End -->
</script>
<TABLE BGCOLOR="#ffe9bf" cellpadding=3 border=1>
<TR><TD
align=center>
<SCRIPT>
document.write( Temp );
</SCRIPT>
</TD></TR>
</TABLE>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).




©