| | checkbox una sola scelta max_400, permettere una sola scelta al click deselezionare le altre caselle checkbox | |
| |
| | |
| max_400_javascript |
| | checkbox una sola sceltapermettere una sola scelta al click deselezionare le altre caselle checkboxEsempiocheckbox una sola sceltaHTML <script> function scimmia(){ document.foto.src="http://us.123rf.com/400wm/400/400/dedmazay/dedmazay1009/dedmazay100900149/7905641-marrone-scimmia-con-una-banana.jpg"; document.getElementById("check2").checked=false; document.getElementById("check3").checked=false; } function sorcio(){ document.foto.src="http://www.scuolamediabramante.it/classe2.0/wp-content/uploads/2009/11/topolino-favola-inventata-nel-tema1.jpg"; document.getElementById("check1").checked=false; document.getElementById("check3").checked=false; } function nessuno(){ document.foto.src=" "; document.getElementById("check1").checked=false; document.getElementById("check2").checked=false; } </script>
scimmia: <input type="checkbox" id="check1" onClick="scimmia()"><br> sorcio: <input type="checkbox" id="check2" onClick="sorcio()"><br> nessuno: <input type="checkbox" id="check3" onClick="nessuno()" checked><br>
<div align=center> <img name="foto" src=" " width=347 height=400> </div> Al click sulla casella scelta scompare il segno di spunta nelle altre caselle nel tag IMG vą a finire la foto corrispondente alla scelta che abbiamo fatto.Edited by max_400 - 13/2/2012, 00:58
| | |
| |
|
| 0 replies since 26/12/2011, 18:51 123 views |
| |
| | |