Add a data variable
Description
Write the actual time (Now) wherever you want...
Set up
First, go in your Javascript panel and add this code in all pages:
- Code:
navvers = navigator.appVersion.substring(0,1);
if (navvers > 3)
navok = true;
else
navok = false;
today = new Date;
jour = today.getDay();
numero = today.getDate();
if (numero<10)
numero = "0"+numero;
mois = today.getMonth();
if (navok)
annee = today.getFullYear();
else
annee = today.getYear();
TabJour = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
TabMois = new Array("January","February","March","April","May","June","July","August","September","October","November","Dicember");
messageDate = TabJour[jour] + " " + numero + " " + TabMois[mois] + " " + annee;
Then you have to type this code where you want the data:
- Code:
<script type="text/javascript">
document.write(messageDate);
</script>
Technical problems
![]() | The tutorial was tested on this forum and with the browser Google Chrome; This tutorial works for all the versions! Thanks, the staff |
![]() | For every problem or question please, contact us in the section Support for the tutorials, The staff will answer you as soon as it is possible... |
Friendly,
The team of the Forum of Codes.