当前位置:网站首页>JS use the Icheck plug-in to listen and get the value of the checkbox
JS use the Icheck plug-in to listen and get the value of the checkbox
2022-06-10 12:15:00 【BlizzardWu】
HTML:
<tbody class="text-c tbody" id="tbody">
{foreach $order as $v}
<tr class="info_tr " jwid="{$v.id}" tit="{$v.title}">
<td ><input id="is_show_{$v.id}" class="is_show" type="checkbox" name="is_show" {if condition="$v.is_show eq 1"}checked{/if} value="{$v.is_show}" eid="{$v.id}"></td>
<td>{$v.title}</td>
</tr>
{/foreach}
</tbody>
javascript:
$(".is_show").on('ifClicked', function(event){
// From this place checked Contrary to reality , Because the click event happened before the real change , Therefore, it is necessary to take the opposite
var multiSelect = event.target.checked ? 0 : 1;
// console.log(event.target);
// Modify as selected value value
if(multiSelect == 1){
event.target.value = 1;
}else{
event.target.value = 0;
}
});
边栏推荐
- IndexedDB 数据库的使用
- Xijun data cooperates with Alibaba cloud to obtain Alibaba cloud product integration certification!
- 共筑数字经济可信底座|2022可信数据库峰会即将召开
- 大牛推荐,吊打面试官
- print(net) vs. net. parameters vs. net. named_ parameters
- 合集资料,必看
- Living in the last era, etcd 3.0 is so simple to implement distributed locks!
- [Accessibility] Missing contentDescription attribute on image
- Unity打字机,使文本自动滚至文本框底部
- Pytorch has fixed parameters and detach clone
猜你喜欢

Remote access to tensorboard

ZipOutputStream使用

大牛推荐,吊打面试官

Building a trusted base for digital economy 𞓜 2022 trusted database summit will be held soon

4.25 million budget bidding: centralized procurement of onsite maintenance services for Oracle, teledb, telepg and other core system databases of Jiangsu Telecom

MAX3051的can芯片的学习

Shadergraph - 303 swaying grass

国际档案日|瀚高数据库以科技赋能数字档案建设

ShaderGraph——水晶

(10) Notes on null pointer accessing member function and this pointer
随机推荐
CF894C Marco and GCD Sequence
Building a trusted base for digital economy 𞓜 2022 trusted database summit will be held soon
[Accessibility] Missing contentDescription attribute on image
C語言最佳實踐之庫文件介紹(下)
怎样将PDF作为矢量图插入PPT中
【云图说】每个成功的业务系统都离不开APIG的保驾护航
ShaderGraph——水面
ShaderGraph——303摇曳的小草
'getDrawable(int)' is deprecated,getDrawable过时
Yet Another Palindrome Partitioning
[yuntu Said] chaque système d'affaires réussi ne peut pas être séparé de l'escorte de l'apig
Product milestones in May 2022
Web design and development, efficient web development
(7) Deep and shallow copy
print(net) vs. net. parameters vs. net. named_ parameters
极简随机音乐播放器
web设计与开发,高效web开发
shape颜色渐变、圆角、半圆角、边框、填充
425万预算招标:江苏电信Oracle、TeleDB、TelePG等核心系统数据库驻场维保服务集中采购
js点击按钮向左侧滑动效果