程式碼示例:
js反選/全選
<table border="1" align="center" width="80%">
<tr>
<th><input
type="checkbox" onclick="checkall()"/><input
type="button" value="反選" onclick="inverseChk()"/></th>
<th>主鍵序號</th>
</tr>
<tbody>
<c:forEach items="${page.list }"
var="recruit">
<tr align="center">
<td><input type="checkbox"
name="checkid" value="${recruit.nid }" /></td>
<td> ${recruit.nid }</td>
<td>${recruit.cjob }</td>
</c:forEach>
</tbody>
</table>
程式碼示例:
js反選/全選
<table border="1" align="center" width="80%">
<tr>
<th><input
type="checkbox" onclick="checkall()"/><input
type="button" value="反選" onclick="inverseChk()"/></th>
<th>主鍵序號</th>
</tr>
<tbody>
<c:forEach items="${page.list }"
var="recruit">
<tr align="center">
<td><input type="checkbox"
name="checkid" value="${recruit.nid }" /></td>
<td> ${recruit.nid }</td>
<td>${recruit.cjob }</td>
</tr>
</c:forEach>
</tbody>
</table>