- <script type="text/javascript">
- $(function() {
- $("#selectall").click(function() {
- $("input[@name='shareuser[]']").each(function() {
- $(this).attr("checked", true);
- });
- });
- $("#deselectall").click(function() {
- $("input[@name='shareuser[]']").each(function() {
- $(this).attr("checked", false);
- });
- });
- });
- </script>
- <input type='checkbox' id='in-shareuser-10' name='shareuser[]' value='10' />UserA
- <input type='checkbox' id='in-shareuser-11' name='shareuser[]' value='11' />UserB
- <input type='checkbox' id='in-shareuser-12' name='shareuser[]' value='12' />UserC
- <input type="button" id="selectall" name="selectall" value="全选" />
- <input type="button" id="deselectall" name="deselectall" value="取消全选" />
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
|