| |||||
| Dernière réponse | |
|---|---|
| Sujet : pb en JS | |
| seb63 | oui c'est possible: > <html> > <script> > > function recup_data() > { > var longueur_select = document.mon_form.mon_select.length; > > for (x=0; x<longueur_select; x++) > { > valeur = document.mon_form.mon_select.options[x].value; > texte = document.mon_form.mon_select.options[x].text; > > alert (valeur+"\n"+texte); > } > > > > return false; > } > > </script> > > > <body> > > <form name="mon_form"> > > <select name="mon_select"> > <option value="value_1">txt 1 > <option value="value_2">txt 2 > <option value="value_3">txt 3 > <option value="value_4">txt 4 > </select> > > <br> > <br> > <br> > <a href="#" onClick="return recup_data()">un lien</a> > > </form> > </html> tout simplement... |
| Vue Rapide de la discussion |
|---|