<SCRIPT TYPE="text/javascript">
function BoxCheckedCircle(circle){
var elements = document.getElementsByClassName(circle);
for (i = 0; i < elements.length; i++) {
elements[i].checked = true;
}
}
function BoxCheckedCommu(commu){
var elements = document.getElementsByClassName(commu);
for (i = 0; i < elements.length; i++) {
elements[i].checked = true;
}
}
</SCRIPT>
<FORM NAME="form1">
<table border="1">
<tr>
<td></td>
<td></td>
<td>サークル1</td>
<td>サークル2</td>
<td>サークル3</td>
</tr>
<tr>
<td></td>
<td></td>
<td><INPUT TYPE="button" onClick="BoxCheckedCircle('circle_1');" VALUE="全て選択"></td>
<td><INPUT TYPE="button" onClick="BoxCheckedCircle('circle_2');" VALUE="全て選択"></td>
<td><INPUT TYPE="button" onClick="BoxCheckedCircle('circle_3');" VALUE="全て選択"></td>
</tr>
<tr>
<td>店舗1</td>
<td><INPUT TYPE="button" onClick="BoxCheckedCommu('commu_1');" VALUE="全て選択"></td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_1_circle_1" class="commu_1 circle_1"> </td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_1_circle_2" class="commu_1 circle_2"> </td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_1_circle_3" class="commu_1 circle_3"> </td>
</tr>
<tr>
<td>店舗2</td>
<td><INPUT TYPE="button" onClick="BoxCheckedCommu('commu_2');" VALUE="全て選択"></td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_2_circle_1" class="commu_2 circle_1"> </td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_2_circle_2" class="commu_2 circle_2"> </td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_2_circle_3" class="commu_2 circle_3"> </td>
</tr>
<tr>
<td>店舗3</td>
<td><INPUT TYPE="button" onClick="BoxCheckedCommu('commu_3');" VALUE="全て選択"></td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_3_circle_1" class="commu_3 circle_1"> </td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_3_circle_2" class="commu_3 circle_2"> </td>
<td><INPUT TYPE="checkbox" NAME="chk" VALUE="commu_3_circle_3" class="commu_3 circle_3"> </td>
</tr>
</FORM>
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme