jquery 完成checkbox 全选问题
来源:互联网 发布:淘宝轮播图片不清晰 编辑:程序博客网 时间:2024/05/16 09:42
<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() {
$("#button_show").click(function() {
$("#age").show();
});
$("#button_hide").click(function() {
$("#age").hide();
});
});
function selectAll(field) {
$(":checkbox[name='empId']").attr("checked", field.checked);
}
</script>
</head>
<body>
用户:<input type="text" id="username"><br>
年龄:<input type="text" id="age"><br>
<input type="button" value="显示" id="button_show">
<input type="button" value="隐藏" id="button_hide">
<input type="checkbox" name="empId" onclick="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>
<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() {
$("#button_show").click(function() {
$("#age").show();
});
$("#button_hide").click(function() {
$("#age").hide();
});
});
function selectAll(field) {
$(":checkbox[name='empId']").attr("checked", field.checked);
}
</script>
</head>
<body>
用户:<input type="text" id="username"><br>
年龄:<input type="text" id="age"><br>
<input type="button" value="显示" id="button_show">
<input type="button" value="隐藏" id="button_hide">
<input type="checkbox" name="empId" onclick="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>
- jquery 完成checkbox 全选问题
- jquery 完成checkbox的全选功能
- jquery checkbox 全选失效问题
- jquery 完成checkBox完成全选\全不选\反选的功能
- 关于jquery中checkbox全选一次问题
- jQuery--checkbox全选/取消全选
- jQuery--checkbox全选/取消全选
- jQuery--checkbox全选/取消全选
- jquery checkbox全选取消全选
- jQuery--checkbox全选/取消全选
- jQuery--checkbox全选/取消全选
- Jquery 实现全选checkbox
- jquery checkbox部分全选
- jquery checkbox全选
- jquery checkbox 全选
- jQuery之checkbox全选
- jQuery checkbox全选
- Jquery全选/取消checkbox
- hdu 3980
- 我的大学计算机学习
- jquery的选择器
- 索引文件的操作
- poj 2774 后缀数组 最长公共子串
- jquery 完成checkbox 全选问题
- jar cvf xx.jar *.*
- 百度百科-模拟退火算法
- 计算大数阶乘--Python版
- jquery checkbox全选问题 一句代码搞定
- 科目二移库
- poj1001Exponentiation高精度幂运算
- 几个cpp程序
- svn update XX.svn-base 系统找不到指定的文件