Bonjour,
j'ai un soucis pour faire fonctionner un bout de code qui marche bien sous IE avec firefox.
je cherche à récupérer libelle, sous IE, le libellé est bien affiché, mais sous firefox j'ai un undefined...
quelqu'un peut me dire quelle est l'alternative sous FF svp ? merci
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
17
18
19
20
21
22
23
24 <html> <head> <script language="JavaScript"> function test(){ var t = document.getElementById("combo").options[document.getElementById("combo").options.selectedIndex].libelle; alert(t); } </script> </head> <body> <SELECT id="combo" name="combo" > <option value="hhh1" libelle="3hhh">hhh</option> </SELECT> <input type="button" value="test" onclick="test();"/> </body> </html>
Partager