<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="table_lists">
<tbody>
<tr>
<td width="40"><input type="checkbox" value="A00" class="cbx_child" name="level" /></td>
<td width="100"><b>统计概览</b></td>
<td> </td>
</tr>
<tr>
<td width="40"><input type="checkbox" value="A01" class="cbx_child" name="level" /></td>
<td width="100"><b>文档管理</b></td>
<td> <span class="res_classify"><input type="checkbox" id="A0101" value="A0101" class="cbx_child_and" name="level" /><label for="A0101">添加文档</label></span> <span class="res_classify"><input type="checkbox" id="A0102" value="A0102" class="cbx_child_and" name="level" /><label for="A0102">修改任意文档</label></span> <span class="res_classify"><input type="checkbox" id="A0103" value="A0103" class="cbx_child_and" name="level" /><label for="A0103">审核文档</label></span> <span class="res_classify"><input type="checkbox" id="A0104" value="A0104" class="cbx_child_and" name="level" /><label for="A0104">移动文档</label></span> <span class="res_classify"><input type="checkbox" id="A0105" value="A0105" class="cbx_child_and" name="level" /><label for="A0105">复制文档</label></span> <span class="res_classify"><input type="checkbox" id="A0106" value="A0106" class="cbx_child_and" name="level" /><label for="A0106">删除文档</label></span> <span class="res_classify"><input type="checkbox" id="A0107" value="A0107" class="cbx_child_and" name="level" /><label for="A0107">清空文档</label></span> </td>
</tr>
<tr>
<td width="40"><input type="checkbox" value="A02" class="cbx_child" name="level" /></td>
<td width="100"><b>分类管理</b></td>
<td> <span class="res_classify"><input type="checkbox" id="A0201" value="A0201" class="cbx_child_and" name="level" /><label for="A0201">添加分类</label></span> <span class="res_classify"><input type="checkbox" id="A0202" value="A0202" class="cbx_child_and" name="level" /><label for="A0202">修改分类</label></span> <span class="res_classify"><input type="checkbox" id="A0203" value="A0203" class="cbx_child_and" name="level" /><label for="A0203">删除分类</label></span> </td>
</tr>
</tbody>
</table>
<script src="jquery-1.8.3.min.js"></script>
<script>
$(function(){
$('input.cbx_child').change(function(){
var cbx_child_and = $(this).parent().siblings().find('input');
$(this).prop('checked')?cbx_child_and.prop('checked',true):cbx_child_and.prop('checked',false);
});
$('input.cbx_child_and').change(function(){
if($(this).prop('checked')){
$(this).prop('checked',true).parents('td').siblings().children('.cbx_child').prop('checked',true);
}
else{
if($(this).parents('td').find("input:checked").length==0){
$(this).parents('td').siblings().children('.cbx_child').prop('checked',false);
}
}
});
});
</script>
</body>
</html>

最新文章

  1. 【转】 C++使用zlib库(-)
  2. HDU 5001
  3. Spring---Web MVC关于前台传值转换问题
  4. asp.net中ScriptManager自带Ajax与jQuery事件冲突
  5. WPF Radio组的绑定
  6. Java 8 中新的 Date 和 Time 类入门详解
  7. [Swust OJ 188]--异面空间(读懂题意很重要)
  8. SublimeText编辑器替代notepad++了
  9. 兔子与樱花[HEOI2015]
  10. C#参数详解
  11. python web框架之Tornado
  12. phpcms的验证码替换 及 phpcms实现全站搜索功能
  13. Ubuntu 16.06 安装拼音输入法 设置双拼
  14. 【Python3爬虫】最新的模拟登录新浪微博教程
  15. January 14th, 2018 Week 02nd Sunday
  16. HTML DOM 学习笔记
  17. mysql 架构~MGR监控手段
  18. MongoDB 分布式部署教程
  19. Roslyn编译器-C#动态脚本实现方案
  20. Python3.5 学习九

热门文章

  1. ThreadPoolExecutor(转)
  2. [zz]npm安装错误解决方法
  3. SSM三大框架整合详细教程
  4. 【ecos学习3】redboot on vmware 网络配置
  5. Hadoop伪分布式搭建步骤
  6. C#多显示器转换的两种方法——SetWindowPos,Screen
  7. position:absolute实现垂直居中
  8. 在flash builder 4.6中使用ant编译项目的详细过程
  9. Oracle表空间常用操作
  10. 蜂窝移动网络是什么,它和 Wi-Fi 有什么区别? 蓝牙和无线有什么区别?