Hello
Nul en javascript, j'ai trouvé un script sympa qui marche
Mais la validation me donne 2 erreurs :
Warning Line 57, Column 26: character "<" is the first character of a delimiter but occurred as data

timeValue += ((seconds < 10) ? ":0" : ":") + seconds;

This message may appear in several cases:

* You tried to include the "<" character in your page: you should escape it as "&lt;"
* You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
* Another possibility is that you forgot to close quotes in a previous tag.

Error Line 56, Column 26: XML Parsing Error: StartTag: invalid element name

timeValue += ((minutes < 10) ? ":0" : ":") + minutes;

Error Line 57, Column 26: XML Parsing Error: StartTag: invalid element name

timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
Le script :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<script type="text/javascript">
		function runClock() {
  today   = new Date();
  hours   = today.getHours();
  minutes = today.getMinutes();
  seconds = today.getSeconds();
  timeValue = hours;
 
 
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
  document.getElementById("time").value = timeValue;
  timerRunning = true;
}
timerID = setInterval(runClock,1000);
</script>
Sympa de m'aider, je tiens à la validation !