当前位置:网站首页>复选框的使用:全选,全不选,选一部分
复选框的使用:全选,全不选,选一部分
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为标记用来区分是全选复选框,某个复选框
边栏推荐
- HW initial preparation
- [C语言]给账号密码进行MD5加密
- Joking about Domain Driven Design (III) -- Dilemma
- [fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
- What is the way out for children from poor families?
- 【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
- Strategy application of Dameng database
- Variable declarations following if statements
- sql server 查询指定表的表结构
- Cancer biopsy instruments and kits - market status and future development trends
猜你喜欢
![[hcia]no.15 communication between VLANs](/img/59/a467c5920cbccb72040f39f719d701.jpg)
[hcia]no.15 communication between VLANs

用docker 连接mysql的过程

The Linux server needs to install the agent software EPS (agent) database
![[shutter] banner carousel component (shutter_wiper plug-in | swiper component)](/img/a6/5c97ef3f34702b83ebf0511501d757.gif)
[shutter] banner carousel component (shutter_wiper plug-in | swiper component)

Pytest (6) -fixture (Firmware)
![ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc](/img/cb/145937a27ef08050a370d5a255215a.jpg)
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc

Add MDF database file to SQL Server database, and the error is reported

超好用的日志库 logzero

MATLAB小技巧(24)RBF,GRNN,PNN-神经网络

A2L file parsing based on CAN bus (2)
随机推荐
Random Shuffle attention
Deep reinforcement learning for intelligent transportation systems: a survey paper reading notes
Build a private cloud disk cloudrev
Matlab tips (24) RBF, GRNN, PNN neural network
Baidu map - surrounding search
TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制
《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨
【富瀚6630编码存录像,用rtsp服务器及时间戳同步实现vlc观看录像】
Change cell color in Excel using C - cell color changing in Excel using C
Getting started | jetpack hilt dependency injection framework
[error record] the parameter 'can't have a value of' null 'because of its type, but the im
2022-2028 global splicing display industry research and trend analysis report
How to use asp Net MVC identity 2 change password authentication- How To Change Password Validation in ASP. Net MVC Identity 2?
As a leader, how to control the code version and demand development when the epidemic comes| Community essay solicitation
Update and return document in mongodb - update and return document in mongodb
Basic operation of binary tree (C language version)
Apple releases MacOS 11.6.4 update: mainly security fixes
Installation and use of memory leak tool VLD
Force deduction ----- the minimum path cost in the grid
tensorflow转pytorch笔记;tf.gather_nd(x,y)转pytorch