Bonjour,
Je n'arrive pas à récupérer un élément <A> qui possède un identifiant (id) en JavaScript.
Voici un code exemple simplifié :
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <html> <head> <script language="javascript"> function tester() { alert(document.getElementById["boutonTest"]); } </script> </head> <body> <a id="boutonTest" onclick="javascript:tester();">Test</a> </body> </html>
Testé sous IE et Firefox.
Une idée ?
Partager