Jump to content

How to add a live JS Time and Date


Guest

Recommended Posts

I thought this was simple and wanted to share this with others.

If you would like to dress up your website and display the current Date and time use this code:

<script  language="javascript"  type="text/javascript">

<!-- Begin

function runClock() {

theTime = window.setTimeout("runClock()", 1000);

var today = new Date();

var display= today.toLocaleString();

window.status=display;

}

window.onload=runClock;

// End -->

</script>

+++++++++++++++++++++++++

Place it near the bottom in skins/(yourskin)/StyleTemplates/global/index.tpl

below the html tag.

timedatestatuszw1.th.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...