Version compl�te: jsB@nk » Form » Checkbox » Vérifier tous les
URL: https://www.javascriptbank.com/check-all.html
Dynamique de contrôle et décoche toutes les cases dans un forme quand un bouton est cliqué. Beaucoup plus facile que manuellement le codage en dur checkbox les noms, bien sûr.
Version compl�te: jsB@nk » Form » Checkbox » Vérifier tous les
URL: https://www.javascriptbank.com/check-all.html
<SCRIPT LANGUAGE="JavaScript"><!-- Modified By: Steve Robison, Jr. ([email protected]) --><!-- Beginvar checkflag = "false";function check(field) {if (checkflag == "false") {for (i = 0; i < field.length; i++) {field[i].checked = true;}checkflag = "true";return "Uncheck All"; }else {for (i = 0; i < field.length; i++) {field[i].checked = false; }checkflag = "false";return "Check All"; }}// End --></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<form name=myform action="" method=post><table><tr><td><b>Your Favorite Scripts & Languages</b><br><input type=checkbox name=list value="1">Java<br><input type=checkbox name=list value="2">JavaScript<br><input type=checkbox name=list value="3">ASP<br><input type=checkbox name=list value="4">HTML<br><input type=checkbox name=list value="5">SQL<br><br> <input type=button value="Check All" onClick="this.value=check(this.form.list)"> </td></tr></table></form><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->