selected对话框全选
selected对话框全选
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="checklist">
<input type="checkbox" value="" /> 篮球
<input type="checkbox" value="" /> 足球
<input type="checkbox" value="" /> 羽毛球
</div>
<div>
<input type="button" value="全选" id="selectall">
<input type="button" value="不选" id="unselect">
<input type="button" value="反选" id="reverseall">
</div> <script type="text/javascript" src="jquery-2.2.3.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#selectall").click(function () {
$("#checklist :checkbox").attr('checked',true)
//$("#checklist").children("input[type='checkbox']").attr('checked',true)
}) $("#unselect").click(function () {
$("#checklist input[type='checkbox']").attr('checked',false)
// $("#checklist").children("input[type='checkbox']").attr('checked',false)
})
}) </script>
</body>
</html>
selected对话框全选的更多相关文章
- 一个js编写全选、弹出对话框、ajax-json的案例
js功能有:全选.弹出对话框.使用json传输ajax数据:不想在写多余的文字了,直接上代码: <%@ page language="java" contentType=&q ...
- winform datagridview在添加全选checkbox时提示:不能设置 selected 或 selected 既不是表 Table 的 DataColumn 也不是 DataRelation。
在项目中,需要多选功能,于是在datagridview添加了一列DataGridViewCheckBoxColumn 在给datagridview绑定完数据集之后,对全选进行操作的时候,发现总报错,报 ...
- JavaScript内容梳理 示例之模态对话框 示例之全选和反选以及取消 示例之后台管理左侧菜单
<!DOCTYPE html> <!--示例之模态对话框--> <html lang="en"> <head> <meta c ...
- ListView+CheckBox实现全选 单击效果
在网上也找了一些案例,但都是用Map来实现的.我的是把对象绑定到当前控件上.代码稍微简洁. main布局文件:main.xml <?xml version="1.0" enc ...
- Ado.net[登录,增删改查,Get传值,全选,不选,批量删除,批量更新]
[虽然说,开发的时候,我们可以使用各种框架,ado.net作为底层的东西,作为一个合格的程序员,在出问题的时候我们还是要知道如何调试] 一.增删改查 cmd.ExecuteReader();执行查询, ...
- JavaScript、全选反选-课堂笔记
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- jquery easyui tree的全选与反选
//全选反选 //参数:selected:传入this,表示当前点击的组件 //treeMenu:要操作的tree的id:如:id="userTree" function tree ...
- vue.js 批量删除跟全选,反选效果
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" ...
- jq pagination分页 全选、单选的思考
$().pagination(总条数,配置项); 后端分页的跨页选择: 思路:把浏览过的页整体保存为,整体拥有 curPage(当前页码).allChoice(当前页是否全选).selected当前页 ...
随机推荐
- Leetcode Unique Binary Search Trees
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For examp ...
- topcoder SRM 622 DIV2 BoxesDiv2
注意题目这句话,Once you have each type of candies in a box, you want to pack those boxes into larger boxes, ...
- Codeforces Round #210 (Div. 2) A. Levko and Table
让对角线的元素为k就行 #include <iostream> using namespace std; int main() { int n,k; cin >> n > ...
- Codeforce - Travelling Salesman
After leaving Yemen, Bahosain now works as a salesman in Jordan. He spends most of his time travelli ...
- POJ 2420 A Star not a Tree?(模拟退火)
题目链接 居然1Y了,以前写的模拟退火很靠谱啊. #include <cstdio> #include <cstring> #include <string> #i ...
- 0代码隐藏GroupedTableView上边多余的间隔
0代码隐藏GroupedTableView上边多余的间隔 实现诸如支付宝的 “探索” 页面时,最简单的方案是在 Storyboard 中来一个静态 Grouped UITableViewControl ...
- Linux-CentOS 6.5 mini 中没有curses.h的问题
1.直接贴过程 [fengbo@CentOS: jigsaw]$ rpm -q ncursesncurses-5.7-3.20090208.el6.i686[fengbo@CentOS: jigsaw ...
- 处理海量数据的高级排序之——快速排序(C++)
代码实现 ...
- 获取IP(windows和linux)
#ifdef _WIN32 #include <winsock2.h> #include <Ws2tcpip.h> #pragma comment(lib,"ws2_ ...
- [LintCode] Segment Tree Build II 建立线段树之二
The structure of Segment Tree is a binary tree which each node has two attributes startand end denot ...