jquery全选反选
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>test</title>
</head>
<script type="text/javascript" src="jquery.js?2015"></script> <!--不能用<script src="jquery.js"/>,必须<script></script> -->
<script type="text/javascript" language="javascript">
$(document).ready(function(){ $("#selectAllorNone").click(function(){
//alert('run'); $("#checkList :checkbox").each(function(){
//alert('run');
$(this).attr("checked",!$(this).attr("checked")); }); });
});
</script>
<body>
<div id="checkList">
<input type="checkbox">心</input>
<input type="checkbox">想</input>
<input type="checkbox">事</input>
<input type="checkbox">成</input>
</div>
<input type="button" value="全选/全不选" id="selectAllorNone">
<input>
</body>
</html>
jquery全选反选的更多相关文章
- jQuery全选/反选checkbox
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 关于JQuery全选/反选第二次失效的问题
最近在项目中,遇到一个问题,测试全选/反选功能时,第一次对母框进行选中/非选中时,能同步子框的全选/反选状态,之后再点击母框,子框就没反应了.原代码大致结构关键如下: function selectA ...
- jQuery全选反选插件
(function($){ $.fn.check = function(options){ var options = $.extend({ element : "input[name='n ...
- jQuery全选反选实例
1. $('#tb:checkbox').each(function(){ 每次都会执行 全选-取消操作,注意$('#tb :checkbox').prop('checked',true); tb后面 ...
- JQuery 全选 反选 获取Table 中指定td的元素值
//全选 function initTableCheckbox() { var $thr = $('table thead tr'); var $checkAllTh = $('<th>& ...
- jquery全选 反选
//全选 反选 $('#chkAll').on('click',function(){ $('input.chkbox').prop('checked',$(this).prop('checked') ...
- 关于jquery全选反选 批量删除的一点心得
废话不多说直接上代码: 下面是jsp页面的html代码: <table id="contentTable" class=""> <thead& ...
- jQuery 全选 反选 单击行改变背景色
我先把CSS样式放出来,其实这个可以直接忽略 ;;font-size:12px;font-family:微软雅黑;} .datagrid{width:100%;} .datagird tr th{ba ...
- jquery 全选反选 .prop('checked',!$(this).is(':checked'));
//废话不说直接上代码 $("#").click(function(){ $("#content-div label input[type='checkbox']&quo ...
随机推荐
- 2.4、CDH 搭建Hadoop在安装(Cloudera Software安装和配置MySQL)
为Cloudera Software安装和配置MySQL 要使用MySQL数据库,请按照以下过程操作.有关MySQL数据库兼容版本的信息,请参阅CDH和Cloudera Manager支持的数据库. ...
- ORA-30926: 无法在源表中获得一组稳定的行ORA-06512: 在 "STG.FP_MO_SPLIT", line 1562 临时
- vue 学习1
.static{ border-radius:4px; } .active { width: 100px; height: 100px; background: green; } .text-dang ...
- Avalon Framework
Apache Avalon has closed. Apache Avalon began in 1999 as the Java Apache Server Framework and in lat ...
- tabindex 去掉虚线
参考 https://bbs.csdn.net/topics/390165247 style="outline: none"
- Python os.sep()
os.sep是什么 python是跨平台的.在Windows上,文件的路径分隔符是'\',在Linux上是'/'. 为了让代码在不同的平台上都能运行,那么路径应该写'\'还是'/'呢? 使用os.se ...
- 动态规划 51nod 1183
题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1183 1183 编辑距离 基准时间限制:1 秒 空间限制:1 ...
- hdu 2089 数位dp
链接:https://vjudge.net/problem/23625/origin 中文,题目不用说了. 其实这题的数据很小,所以直接暴力也可以过,但是还是要学会数位dp,因为并不是每一题的数据都会 ...
- 文本工具 TextUtils 字符串
常用方法: isEmpty:判断字符串是否为空值 getTrimmedLength:获取字符串去除头尾空格之后的长度 isDigitsOnly:判断字符串是否全部由数字组成 ellipsize:如果字 ...
- scrapy的调试和环境安装技巧
1,先在settings中把ROBOTSTXT_OBEY = False 在主目录下面新建main文件 __autor__ = 'zhouli' __date__ = '2018/11/3 22:39 ...