Script Categories













Date & Time >>> Title Bar.

Displays a clock in the browser window's title bar at the top of the screen after the page's title. (This does not seem to work in frames).

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 clocktext, timeday;
var pagetitle = document.title;
function Scroll() {
today = new Date();
sec = today.getSeconds();
hr = today.getHours();
min = today.getMinutes();
if (hr < 12) { timeday = " AM"; }
else { timeday = " PM"; }
if (hr > 12) hr = hr - 12;
if (hr <= 9) hr = "0" + hr;
if (min <= 9) min = "0" + min;
if (sec <= 9) sec = "0" + sec;
var clocktext = " - " + hr + ":" + min + ":" + sec + timeday;
document.title = pagetitle + clocktext;
clocktimer = setTimeout("Scroll()", 1000);
}
window.onload = Scroll;
//  End -->
</script>

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!).




©