当前位置:网站首页>Use of check boxes: select all, deselect all, and select some
Use of check boxes: select all, deselect all, and select some
2022-07-03 02:57:00 【A stream kite CD】
function ck(n){
// Get all checkboxes
var cks = document.getElementsByName("checkbox");
// Get the checkbox with all selected
var ckz=document.getElementById("checkboxs");
var m = 0;// Calculate the number of checked products
if (n!=-1) {
// Determine whether it is the select all button
ckz.checked=false;// Not the select all button , The button is set to false
for (var i = 0; i < cks.length; i++) {
if (cks[i].checked) {
m++;
}
}
if (m==cks.length){
ckz.checked=true;
}
}else {
for (var i = 0; i < cks.length; i++) {
cks[i].checked = ckz.checked;
m++;
}
}
}
n The mark is used to distinguish whether the check box is selected all , A check box
边栏推荐
- 用docker 連接mysql的過程
- Linear rectification function relu and its variants in deep learning activation function
- Three. JS local environment setup
- [principles of multithreading and high concurrency: 1_cpu multi-level cache model]
- Strategy application of Dameng database
- 内存泄漏工具VLD安装及使用
- Apple releases MacOS 11.6.4 update: mainly security fixes
- What is the way out for children from poor families?
- Didi programmers are despised by relatives: an annual salary of 800000 is not as good as two teachers
- HTB-Devel
猜你喜欢
[translation] the background project has joined the CNCF incubator
超好用的日志库 logzero
From C to capable -- use the pointer as a function parameter to find out whether the string is a palindrome character
Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution
C语言初阶-指针详解-庖丁解牛篇
Check log4j problems using stain analysis
Check log4j problems using stain analysis
SQL statement
力扣------网格中的最小路径代价
Joking about Domain Driven Design (III) -- Dilemma
随机推荐
[translation] modern application load balancing with centralized control plane
"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
yii2 中andWhere多个or查询 orm条件
Wechat - developed by wechat official account Net core access
Can netstat still play like this?
I2C subsystem (III): I2C driver
Sqlserver row to column pivot
Notifydatasetchanged not applicable to recyclerview - notifydatasetchanged not working on recyclerview
The base value is too large (the error is marked as "08") [duplicate] - value too great for base (error token is'08') [duplicate]
Classes and objects - initialization and cleanup of objects - constructor call rules
Matlab tips (24) RBF, GRNN, PNN neural network
Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
How to use asp Net MVC identity 2 change password authentication- How To Change Password Validation in ASP. Net MVC Identity 2?
Source code analysis | layout file loading process
Didi programmers are despised by relatives: an annual salary of 800000 is not as good as two teachers
[error record] the parameter 'can't have a value of' null 'because of its type, but the im
How to limit the size of the dictionary- How to limit the size of a dictionary?
Joking about Domain Driven Design (III) -- Dilemma
What does "where 1=1" mean
Unity3d human skin real time rendering real simulated human skin real time rendering "suggestions collection"