<html>
<head>
<title>test1.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<script type="text/javascript">
function selectAll(field) {
$(":checkbox[name='empId']").prop("checked", field.checked);
}
//很简单就一句代码
</script>
</head>
<body>
<input type="checkbox" name="empId" οnclick="selectAll(this)"/>全选</br>
<input type="checkbox" name="empId" /></br>
<input type="checkbox" name="empId"/ ></br>
<input type="checkbox" name="empId" /></br>
<input type="checkbox" name="empId" /></br>
<input type="checkbox" name="empId" /></br>
<input type="checkbox" name="empId" /></br>
<input type="checkbox" name="empId" /></br>
</body>
</html>