Date and time on the site

If you need to show the current time and date on the page, then this script is just for you.

The script can easily be installed on a separate page anywhere, or on the entire site.

function clock() {
var d = new Date();
var month_num = d.getMonth()
var day = d.getDate();
var hours = d.getHours();
var minutes = d.getMinutes();
var seconds = d.getSeconds();
month=new Array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12");
if (day if (hours if (minutes if (seconds if (document.layers) {
else document.getElementById("doc_time").innerHTML = date_time;
setTimeout("clock()", 1000);

Then, in the place where you must have a string with the date and time, the html and the start script are prescribed.

You can also write them in the end, and then position in the styles to where you want and make the design.

<span id="doc_time"></span>
font-family: Impact;
color: #999;
font-style: italic;
position: absolute;
top: 10px;
left: 30px;

I wish you creative success.

This entry was posted in Free Scripts Ready Code. Bookmark the permalink.
А так же:

Leave a Reply

Your email address will not be published. Required fields are marked *