»
AnglaisFranaisVietnamien

Imprimer - Choisissez-en un - JavaScriptBank.com

Version complte: jsB@nk » Form » Checkbox » Choisissez-en un
URL: https://www.javascriptbank.com/select-one.html

Choisissez-en un © JavaScriptBank.comLimite le nombre de cases cliquez sur un utilisateur mai en désactivant les autres sur la sélection. Cool!

Version complte: jsB@nk » Form » Checkbox » Choisissez-en un
URL: https://www.javascriptbank.com/select-one.html



JavaScript
<SCRIPT LANGUAGE="JavaScript">// Mike Best (mike.best@hei-usa.com)<!-- Beginfunction checkBoxValidate(cb) {for (j = 0; j < 8; j++) {if (eval("document.myform.ckbox[" + j + "].checked") == true) {document.myform.ckbox[j].checked = false;if (j == cb) {document.myform.ckbox[j].checked = true;         }      }   }}//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name=myform>Selection 1<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(0)"><br>Selection 2<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(1)"><br>Selection 3<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(2)"><br>Selection 4<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(3)"><br>Selection 5<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(4)"><br>Selection 6<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(5)"><br>Selection 7<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(6)"><br>Selection 8<input type="checkbox" name="ckbox" onClick="javascript:checkBoxValidate(7)"><br></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->