Firefox / IE récupération <option> avec IE
encore un problème Firefox / IE j'ai mis une alerte pour voir le resultat :
Marche avec Firefox :
0 --- Blanc perle
pas IE :
0 ---
Code:
1 2 3 4 5 6 7 8 9
|
For(y=0; y<document.forms["popup"].elements["B_face0"].length; y++)
{
if(document.forms["popup"].elements["B_face0"].options[y].selected == true)
{
face0 = document.forms["popup"].elements["B_face0"].options[y].value;
alert (y+" --- "+face0);
}
} |
code HTML :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
<form name="popup">
<select name="B_face0" size="6">
<option selected="selected">Blanc perle</option>
<option>Gris perle</option>
<option>Ivoire perle</option>
<option>Tempo gris</option>
<option>Roc gris</option>
<option>Alu brossé</option>
<option>Erable</option>
<option>Poirier</option>
<option>Erable wl</option>
<option>Hêtre</option>
<option>Hêtre de fil</option>
<option>Cerisier clair</option>
<option>Mastic</option>
<option>Ciment</option>
<option>Conifère mastic</option>
<option>Chêne horizontal</option>
<option>Conifère tabac</option>
<option>Noyer</option>
</select>
</form> |