souci d'appel Javascript.

souci d'appel Javascript. - Programmation

Marsh Posté le 29-08-2001 à 16:22:14    

salut,
 
je voudrais écrire la date courante dans une page HTML.
ça me paraissait tout bête jusqu'au moment où je me suis énervé parce que rien ne s'affiche...:sarcastic:
 
j'ai fait un fichier date.js:
 
function getMyDate(){
 var today = new Date();
 
 var months = new Array("janvier","février","mars","avril",
"mai","juin","juillet","août","septembre"
,"octobre","novembre","décembre" );
 
 document.write(today.getDay() + " " + months[today.getMonths()] + " " + today.getYear());
}
 
et dans la page HTML j'ai ceci:
 
<html>
<head>
  <title>test javascript</title>
  <script language="JavaScript" src="date.js"></script>
</head>
<body>
  <p><script language="JavaScript">getMyDate();</script></p>
</body>
</html>
 
beh ça ne donne rien sous Netscape 4.76 (Linux), ni Opera 5.0 encore moins Mozilla.
 
j'ai fait une boulette ?


---------------
As the plane took off, the pilot turned to the co-pilot and said, “Have you ever flown solo?” Co-pilot: No. Typically I fly much higher than this.
Reply

Marsh Posté le 29-08-2001 à 16:22:14   

Reply

Marsh Posté le 29-08-2001 à 16:39:07    

Tu va rire mais si tu enlève le s de getMonths, ça marche vachement mieux !  
Ca fait longtemps que tu t'enerve sur ton code ? Hein dis ?
;o)

Reply

Marsh Posté le 29-08-2001 à 16:59:29    

:lol:  :lol:  :lol:  
 
un s en trop  :(

Reply

Marsh Posté le 29-08-2001 à 17:00:49    

oh put@in le dégénéré de la moëlle... si ça c'est pas avoir l'air con...
 
euh... merci!


---------------
As the plane took off, the pilot turned to the co-pilot and said, “Have you ever flown solo?” Co-pilot: No. Typically I fly much higher than this.
Reply

Marsh Posté le 29-08-2001 à 17:02:52    

moi cest pire je me suis fait chier 10 ans a cause dun point virgule  :sarcastic:  
 
jai trouver tout seul  :lol:

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed