<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
var chk_flag = "false";
function check(field) {
if (chk_flag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;
}
chk_flag = "true";
return "すべてをOFF";
}
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false;
}
chk_flag = "false";
return "すべてをON";
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<center>
<form>
<input type=checkbox name=list value="1">ラーメン
<input type=checkbox name=list value="2">チャーハン
<input type=checkbox name=list value="3">ギューザ
<input type=checkbox name=list value="4">酢 豚<br>
<input type=button value="すべてをON" onClick="this.value=check(this.form.list)">
</form>
</center>
</BODY>
</HTML>
|