我有一组复选框和一个主复选框,如果我选中主复选框,那么其余的将被选中,但我可以一个一个地检查。所以我有一个链接,我只想在选中一个或多个复选框时显示该链接,如何?
编辑:这是用于测试的 HTML 代码:
<table width="100%">
<thead>
<tr>
<td style="text-align:center;"><input type="checkbox" name="message_delivery" /></td>
<td>Asunto</td>
<td>Para</td>
<td>Fecha</td>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" name="message_delivery[]" value="1" /></td>
<td><a href="messages/show/id/1" class="read">sadasdasdas</a></td>
<td>Demo Demo</td>
<td>Wednesday, 05 de September de 2012 - 11:51:19 AM</td>
</tr>
<tr>
<td><input type="checkbox" name="message_delivery[]" value="1" /></td>
<td><a href="messages/show/id/1" class="read">sadasdasdas</a></td>
<td>170ead917-FN 170ead917-LN</td>
<td>Wednesday, 05 de September de 2012 - 11:51:19 AM</td>
</tr>
<tr>
<td><input type="checkbox" name="message_delivery[]" value="1" /></td>
<td><a href="messages/show/id/1" class="read">sadasdasdas</a></td>
<td>Demo1 Lastname1</td>
<td>Wednesday, 05 de September de 2012 - 11:51:19 AM</td>
</tr>
<tr>
<td><input type="checkbox" name="message_delivery[]" value="1" /></td>
<td><a href="messages/show/id/1" class="read">sadasdasdas</a></td>
<td>174889ead-FN 174889ead-LN</td>
<td>Wednesday, 05 de September de 2012 - 11:51:19 AM</td>
</tr>
</tbody>
</table>
<div class="button-bar">
<a href="http://cmv.loc/messages/add">Escribir nuevo</a>
<a id="btn_delete" class="btn_delete" style="display:none">Borrar marcados</a>
</div>
如果选中一个或多个复选框,我想显示#btn_delete。
提前欢呼和感谢