Jquery单击选择权限实例
来源:互联网 发布:android 全景拼接算法 编辑:程序博客网 时间:2024/05/23 00:04
HTML代码:
<table class="table table-bordered table-striped with-check"> <thead> <tr> <th></th> <th >一级权限</th> <th ></th> </tr> </thead> <tbody> <tr > <td style="text-align:center"></td> <td style="text-align:center"><label><input type="checkbox" class="authcheck"></label></td><td ><input type="checkbox" class="authcheck1">{$vv.auth_name}</td> </tr> </tbody> </table>
jQuery代码:
$('.authcheck').click(function(){ if ($(this).is(":checked")) { $(this).parent().parent().next().children('input').attr("checked",true) }else{ $(this).parent().parent().next().children('input').attr("checked", false) } }) var i=0; $('.authcheck1').click(function(){ //alert( $(this).parent().children('input').css('background','red')); $(this).parent().children('input').each(function (index, domEle) { if($(this).attr("checked")!='checked'){ i=1; } }); if(i==0){ $(this).parent().prev().children().children('input').attr("checked", true) }else{ $(this).parent().prev().children().children('input').attr("checked", false) } i=0; })
0 0
- Jquery单击选择权限实例
- jquery 标签切换效果,单击选择效果
- JQuery 权限选择例子
- 【JQuery】实例--单击文本,文本消失
- JQuery 权限选择(可以排序)
- 树checkbox选择jquery实例
- GridVew 单击选择行
- CTreeCtrl checkbox 单击选择
- jquery 鼠标单击位置
- jQuery 回车键单击事件
- jQuery参考实例 2.0 用jQuery选择元素
- JQuery zTree v3.5 实例1 节点单击、复选和链接
- GridView单击行 选择checkbox
- 单击按钮弹出选择框
- Cocos2dx单击事件优先级实例
- jQuery - Events事件 - click单击
- jquery 简单的单击事件
- jquery之单击选中demo
- Oracle数据库sql--单表查询
- 用eclipse上传项目到github上
- IplImage 截取感兴趣的部分 ROI函数--只显示截取部分
- 大龄青年转行IT的真实感受1
- 通过手机访问电脑上Apache的端口
- Jquery单击选择权限实例
- linux perf - 性能测试和优化工具
- 常见前端面试题及答案(下)
- 今天听到一首好歌“沉默是金”
- 让Kubernetes集群使用本地image registry
- STL容器之deque双向队列
- [leetCode刷题笔记]2017.02.19
- 内网穿透(NAT穿透)之ngrok搭建服务器
- 文章标题