baigoCheckall 使用方法: 介绍
baigoCheckall 表单全选插件是基于 jQuery 的表单全选插件。
使用方法:
- 载入 jQuery 库文件,例:
<script src="jquery.js" type="text/javascript"></script>
jQuery 库文件请到 http://www.jquery.com 下载
-
载入 baigoCheckall 核心文件,例:
<script src="baigoCheckall.js" type="text/javascript"></script>
-
初始化插件,例:
<script type="text/javascript"> $(document).ready(function(){ $("#form_demo").baigoCheckall(); });</script>
-
在需要操作的 checkBox 中定义 id 和 class
其中,id 代表选框本身,class 代表父元素的 id,例:<input type="checkBox" id="first" class="none" /> <input type="checkBox" id="second_1" class="first" /> <input type="checkBox" id="second_2" class="first" /> <input type="checkBox" id="second_3" class="first" /> <input type="checkBox" id="second_4" class="first" />
当用户选中 id 为 first 的选框的时候,class 为 first 的选框将全部被选中,反之则为未选中;
当任意一个 class 为 first 的选框未被选中时,id 为 first 的选框也会处于未被选中状态。
baigoCheckall 使用方法: 官网
http://www.baigo.net/jquery/baigocheckall.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。