当前位置:网站首页>Use JQ to realize the reverse selection of all and no selection at all - Feng Hao's blog
Use JQ to realize the reverse selection of all and no selection at all - Feng Hao's blog
2022-07-06 16:39:00 【Feng Hao (grow up)】
Ideas :
First call jq file
When we click Select all, we let them all be true
When clicking none of them, we let them all be false
When you click invert Use echo Loop traversal checked Use ! Take the opposite ;
html part
<input type="checkbox">
<input type="checkbox">
<button > Future generations </button>
<button > Not all </button>
<button'> Reverse election </button>
js part
// Click Select all
$('button:first').click(function(){
$(':checkbox').prop('checked',true);
})
// Click none eq: Get inverse selection button
$('button:eq(1)').click(function(){
$(':checkbox').prop('checked',false);
})
// Click invert
$('button:last').click(function(){
$(':checkbox').each(function(index,item){
item.checked = !item.checked;
})
})

边栏推荐
- QT implementation window gradually disappears qpropertyanimation+ progress bar
- Double specific tyrosine phosphorylation regulated kinase 1A Industry Research Report - market status analysis and development prospect prediction
- Click QT button to switch qlineedit focus (including code)
- Codeforces Round #803 (Div. 2)A~C
- Tert butyl hydroquinone (TBHQ) Industry Research Report - market status analysis and development prospect forecast
- Base dice (dynamic programming + matrix fast power)
- Solve the problem that intel12 generation core CPU single thread only runs on small cores
- 第2章 HFDS的Shell操作
- Useeffect, triggered when function components are mounted and unloaded
- Kubernetes cluster deployment
猜你喜欢

业务系统兼容数据库Oracle/PostgreSQL(openGauss)/MySQL的琐事

力扣:第81场双周赛

VMware Tools和open-vm-tools的安装与使用:解决虚拟机不全屏和无法传输文件的问题

使用jq实现全选 反选 和全不选-冯浩的博客

Advancedinstaller installation package custom action open file

第五章 Yarn资源调度器

FLV格式详解
![Story of [Kun Jintong]: talk about Chinese character coding and common character sets](/img/d5/9a9e3a0ba57328749d80ec71cb9467.png)
Story of [Kun Jintong]: talk about Chinese character coding and common character sets

第6章 Rebalance详解

Chapter 7__ consumer_ offsets topic
随机推荐
QT实现圆角窗口
Codeforces Round #798 (Div. 2)A~D
Educational Codeforces Round 130 (Rated for Div. 2)A~C
Codeforces Round #802(Div. 2)A~D
Bisphenol based CE Resin Industry Research Report - market status analysis and development prospect forecast
Hbuilder X格式化快捷键设置
Remove the border when input is focused
Bidirectional linked list - all operations
Pull branch failed, fatal: 'origin/xxx' is not a commit and a branch 'xxx' cannot be created from it
Codeforces - 1526C1&&C2 - Potions
Market trend report, technical innovation and market forecast of tabletop dishwashers in China
Investigation report of bench type Brinell hardness tester industry - market status analysis and development prospect prediction
视频压缩编码和音频压缩编码基本原理
MariaDB的安装与配置
SF smart logistics Campus Technology Challenge (no T4)
<li>圆点样式 list-style-type
解决Intel12代酷睿CPU【小核载满,大核围观】的问题(WIN11)
原生js实现全选和反选的功能 --冯浩的博客
MP4格式详解
Spark independent cluster dynamic online and offline worker node