How to insert time for the website

How to insert time for the website

You work on creation of the website and decided that it would be quite good to install a time counter or hours. Use one of ways of installation, depending on your preferences.


1. Install hours informers on the website through Yandex. Visit the page, select one of tabs in the section "Hours" - with shooters (normal) or with digits (electronic). Find the time zone. It can be done, having verified dial indicators on the computer over time or having guided the mouse cursor at the picture. Left-click on a gear in the upper right corner of hours and select from the list action – "an informer on the website". Pass to a window with HTML code, copy it. Set the code on the section of your website selected for hours.

2. Contact on one of the English-speaking websites offering the huge choice of different "models" of hours. For example, on or Select category in the menu, check the provided options, find "the" hours. Click the picture with them and pass to the page with the license agreement (on or register (on Receive the code, copy it and insert on the place intended for hours on your website.

3. Create dynamic hours by means of Javascript with every second update. Set a normal format of hours: hh: mm: ss (for example, 21:21:21) where h is a time of day, m - minutes, s - seconds. Create the simple page with inclusion of the time.js file with the Javascript:Отображение code dynamic chasovtekushchy time:

4. Create the time.js file with time function execution start every second (1000 ms) and also with start of execution of the time function when addressing to the page. Besides, the text of this document included the identifier "tick_tack".

5. Place both specified the file in one folder then start the index.html file to check whether hours are displayed. If is not present, check whether it is disconnected in the Javascript browser.

Author: «MirrorInfo» Dream Team