当前位置:网站首页>复选框的使用:全选,全不选,选一部分
复选框的使用:全选,全不选,选一部分
2022-07-03 02:56:00 【一尾流鸢cd】
function ck(n){
//获取全部复选框
var cks = document.getElementsByName("checkbox");
//获取全选的复选框
var ckz=document.getElementById("checkboxs");
var m = 0;//计算勾选商品的个数
if (n!=-1) {
//判断是否为全选按钮
ckz.checked=false;//不是全选按钮,按钮设置为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为标记用来区分是全选复选框,某个复选框
边栏推荐
- 左值右指解释的比较好的
- Random shuffle note
- The base value is too large (the error is marked as "08") [duplicate] - value too great for base (error token is'08') [duplicate]
- Cancer biopsy instruments and kits - market status and future development trends
- Getting started | jetpack hilt dependency injection framework
- Installation and use of memory leak tool VLD
- 分布式事务
- Serious security vulnerabilities reported by moxa mxview network management software
- 2022-2028 global splicing display industry research and trend analysis report
- Counter统计数量后,如何返回有序的key
猜你喜欢

I2C subsystem (II): I3C spec

Add automatic model generation function to hade

内存泄漏工具VLD安装及使用

"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
![[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)](/img/65/c1fe95f8c391394f7ff1b75c7d75b6.jpg)
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)

Sqlserver row to column pivot
![[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)](/img/6e/67bc187a89fb9125856c78c89f7bfb.gif)
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)

基于can总线的A2L文件解析(2)

Thunderbolt Chrome extension caused the data returned by the server JS parsing page data exception
![[hcia]no.15 communication between VLANs](/img/59/a467c5920cbccb72040f39f719d701.jpg)
[hcia]no.15 communication between VLANs
随机推荐
Baidu map - surrounding search
Unity3d human skin real time rendering real simulated human skin real time rendering "suggestions collection"
Xiaodi notes
Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)
sql server数据库添加 mdf数据库文件,遇到的报错
Notifydatasetchanged not applicable to recyclerview - notifydatasetchanged not working on recyclerview
[error record] the parameter 'can't have a value of' null 'because of its type, but the im
Wechat - developed by wechat official account Net core access
Sqlserver row to column pivot
Add automatic model generation function to hade
Interview stereotyped version
The left value and the right finger explain better
Andwhere multiple or query ORM conditions in yii2
[C language] MD5 encryption for account password
Change cell color in Excel using C - cell color changing in Excel using C
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
Concrete CMS vulnerability
Two dimensional format array format index subscript continuity problem leads to return JSON format problem
yii2 中andWhere多个or查询 orm条件
SqlServer行转列PIVOT