当前位置:网站首页>复选框的使用:全选,全不选,选一部分
复选框的使用:全选,全不选,选一部分
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为标记用来区分是全选复选框,某个复选框
边栏推荐
- Why choose a frame? What frame to choose
- [principles of multithreading and high concurrency: 1_cpu multi-level cache model]
- SqlServer行转列PIVOT
- 超好用的日志库 logzero
- ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
- SQL server queries the table structure of the specified table
- [shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)
- Force deduction ----- the minimum path cost in the grid
- [fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)
- [translation] the background project has joined the CNCF incubator
猜你喜欢

SQL statement
![[shutter] banner carousel component (shutter_wiper plug-in | swiper component)](/img/a6/5c97ef3f34702b83ebf0511501d757.gif)
[shutter] banner carousel component (shutter_wiper plug-in | swiper component)

random shuffle注意

Random Shuffle attention

Random shuffle note

《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨

Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)

从C到Capable-----利用指针作为函数参数求字符串是否为回文字符

力扣------网格中的最小路径代价

【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
随机推荐
Force freeing memory in PHP
C语言初阶-指针详解-庖丁解牛篇
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
What does it mean when lambda is not entered?
Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
Basic operation of binary tree (C language version)
As a leader, how to control the code version and demand development when the epidemic comes| Community essay solicitation
Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
用docker 連接mysql的過程
Three.js本地环境搭建
后管中编辑与预览获取表单的值写法
Unity3d human skin real time rendering real simulated human skin real time rendering "suggestions collection"
[fluent] futurebuilder asynchronous programming (futurebuilder construction method | asyncsnapshot asynchronous calculation)
How to limit the size of the dictionary- How to limit the size of a dictionary?
The Linux server needs to install the agent software EPS (agent) database
Pytest (6) -fixture (Firmware)
Chart. JS multitooltip tag - chart js multiTooltip labels
I2C 子系统(二):I3C spec
Can netstat still play like this?
SQL statement