DEMONSTRATION :
Afficher la date de modification du document en français :
Modifiée le :
INSTALLATION DU SCRIPT :
Le code à insérer dans la partie
<HEAD>
et
</HEAD>
:
<SCRIPT LANGUAGE="JavaScript"> <!-- /************************************************************************* * APPLICATION : Afficher la date de modification du document en francais * * RECUPERE A L ADRESSE : http://www.asi.fr/~ericbon/htmldoc.htm * **************************************************************************/ function MakeArray(n) {this.length = n; return this;} var Days = new MakeArray(7); var Months = new MakeArray(12); Days[1]="Lundi"; Days[2]="Mardi"; Days[3]="Mercredi"; Days[4]="Jeudi"; Days[5]="Vendredi"; Days[6]="Samedi"; Days[7]="Dimanche"; Months[1]="janvier"; Months[2]="février"; Months[3]="mars"; Months[4]="avril"; Months[5]="mai"; Months[6]="juin"; Months[7]="juillet"; Months[8]="août"; Months[9]="septembre"; Months[10]="octobre"; Months[11]="novembre"; Months[12]="décembre"; function getNiceDate(theDate) { return Days[theDate.getDay()+1] + " " + theDate.getDate() + " " + Months[theDate.getMonth()+1] + " " + theDate.getYear(); } // --> </SCRIPT>
Le code à insérer dans l'instruction
<BODY>
:
Le code à insérer dans la partie
<BODY>
et
</BODY>
:
Affichage de la date de dernière modification de cette page : <SCRIPT LANGUAGE="JavaScript"> <!-- var lastMod = new Date(); lastMod.setTime(Date.parse(document.lastModified)); document.writeln(getNiceDate(lastMod)); // --> </SCRIPT>