当前位置:网站首页>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;
})
})

边栏推荐
- 第三章 MapReduce框架原理
- 第5章 消费者组详解
- 图像处理一百题(11-20)
- Submit several problem records of spark application (sparklauncher with cluster deploy mode)
- Spark's RDD (elastic distributed data set) returns a large result set
- 第五章 Yarn资源调度器
- Codeforces - 1526C1&&C2 - Potions
- Advancedinstaller安装包自定义操作打开文件
- 第7章 __consumer_offsets topic
- Codeforces Round #802(Div. 2)A~D
猜你喜欢

Kubernetes集群部署
![Solve the problem of intel12 generation core CPU [small core full, large core onlookers] (win11)](/img/92/9465a6c9f1ab88c4851a47fabe750c.jpg)
Solve the problem of intel12 generation core CPU [small core full, large core onlookers] (win11)

字节跳动新程序员成长秘诀:那些闪闪发光的宝藏mentor们

Solve the problem that intel12 generation core CPU single thread only runs on small cores

Chapter 1 overview of MapReduce

Li Kou: the 81st biweekly match

Remove the border when input is focused

QT模拟鼠标事件,实现点击双击移动拖拽等

Codeforces Round #799 (Div. 4)A~H

第2章 HFDS的Shell操作
随机推荐
第五章 Yarn资源调度器
Market trend report, technological innovation and market forecast of China's double sided flexible printed circuit board (FPC)
QT实现窗口置顶、置顶状态切换、多窗口置顶优先关系
Spark's RDD (elastic distributed data set) returns a large result set
antd upload beforeUpload中禁止触发onchange
Spark独立集群动态上线下线Worker节点
Codeforces Round #801 (Div. 2)A~C
CMake速成
简单尝试DeepFaceLab(DeepFake)的新AMP模型
Submit several problem records of spark application (sparklauncher with cluster deploy mode)
计算时间差
Chapter 7__ consumer_ offsets topic
Chapter 6 datanode
Codeforces Round #799 (Div. 4)A~H
Simply try the new amp model of deepfacelab (deepfake)
(lightoj - 1349) Aladdin and the optimal invitation (greed)
Remove the border when input is focused
Input can only input numbers, limited input
Story of [Kun Jintong]: talk about Chinese character coding and common character sets
Summary of FTP function implemented by qnetworkaccessmanager