Jquery做全选
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="jquery-1.11.2.min.js"></script>
</head> <body>
<br />
<div><input type="checkbox" id="qx" /> 全选</div>
<br />
<div>
<input type="checkbox" class="ck" /> 山东
<input type="checkbox" class="ck" /> 淄博
<input type="checkbox" class="ck" /> 张店
<input type="checkbox" class="ck" /> 淄川
<input type="checkbox" class="ck" /> 桓台 </div>
</body>
<script type="text/javascript"> $("#qx").click(function(){
var xz = $(this).prop("checked");
$(".ck").prop("checked",xz);
})
</script>
</html>
Jquery做全选的更多相关文章
- 11月8日下午Jquery取属性值(复选框、下拉列表、单选按钮)、做全选按钮、JSON存储、去空格
1.jquery取复选框的值 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt ...
- Jquery取属性值(复选框、下拉列表、单选按钮)、做全选按钮、JSON存储、去空格
1.jquery取复选框的值 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt ...
- 11.8 开课二个月零四天 (Jquery取属性值,做全选,去空格)
1.jquery取复选框的值 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt ...
- jQuery实现全选效果【转】
这是一段用jquery实现全选的代码,主要思路如下: 1.所有的复选框都有单击事件,所有效果都是在单击事件下实现的 2.全选复选框所实现的功能与其他复选选项实现的功能不同,所有在单击事件内做一个判断, ...
- checkbox做全选按钮
1.先写一个html页面,里面写一个全选按钮和几个复选框,实现下面2个要求 (1)点击全选按钮选中时,所有的复选框选中. (2)点击全选按钮取消选中时,所有复选框取消选中. <input typ ...
- jQuery实现全选、全不选、反选
如图,需要使用jQuery实现全选.全不选.反选功能: 核心代码: 全选 $("#check_all").click(function(){ $("input:check ...
- python: jquery实现全选 反选 取消
引入这个jquery-1.12.4.js jquery实现全选 反选 取消 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitio ...
- jquery实现全选、反选、不选
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8&quo ...
- jquery的全选/全不选/反选以及attr添加checked属性失败的解决办法
如下图: <head> <title></title> <style type="text/css"> div { border: ...
随机推荐
- 自定义圆饼(利用贝塞尔曲线和CGContext类完成)
-(void)drawRect:(CGRect)rect{ CGFloat w = self.bounds.size.width; CGFloat h = self.bounds.size.heigh ...
- Go语言语法汇总(转)
Go语言语法汇总 分类: 技术2013-09-16 14:21 3007人阅读 评论(0) 收藏 举报 go语言golang并发语法 目录(?)[+] 最近看了看GoLang,把Go语言的语法 ...
- HDFS shell
bin/hdfs -help bin/hdfs dfs -mkdir -p /yfq/test/ bin/hdfs dfs -put /etc/profile /yfq/test/profile 上传 ...
- Android 基础概念了解
Android 的前世今生Android 系统框架Android 主要组成 部分Android 常用的操作 Android 的前世今生 Android 的诞生 2003年10月,有"Andr ...
- 一、Hello World
刚创建的Android项目是一个基础的Hello World项目,包含一些默认文件,我们需要花一点时间看看最重要的部分: activity_main.xml -- 这是刚才用Android Stud ...
- 1004. Counting Leaves (30)
1004. Counting Leaves (30) A family hierarchy is usually presented by a pedigree tree. Your job is ...
- footer绝对定位但是不在页面最下边解决方案
方案一 html { height: 100%; } body { position: relative; min-height: 100%; box-sizing: border-box; padd ...
- Web墨卡托投影(转)
Google Maps地图投影全解析(1):Web墨卡托投影 Google Maps.Virtual Earth等网络地理所使用的地图投影,常被称作Web Mercator或Spherical Mer ...
- repeater重复器、地址栏传值、response
repeater重复器: <HeaderTemplate> <ItemTemplate> <AlternatingItemTemplate> <FooterT ...
- json.stringfy()和json.parse()
json.stringfy()将对象.数组转换成字符串:json.parse()将字符串转成json对象. json.stringfy(): 语法: JSON.stringify(value [, ...