【发布时间】:2021-06-12 07:37:15
【问题描述】:
我的复选框
<div class="col-md-3" style="padding-left:15 !important;">
<div class="icheckbox_minimal-grey checked disabled" style="position: relative;"><input class="alanlar" type="checkbox" disabled="" name="gunlukAlanlar[]" value="tarih" checked="" style="position: absolute; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins></div>
<label class="control-label" style="margin-left: 5px;color:red;">Tarih</label>
</div>
<div class="col-md-3" style="padding-left:15 !important;">
<div class="icheckbox_minimal-grey checked disabled" style="position: relative;"><input class="alanlar" type="checkbox" disabled="" name="gunlukAlanlar[]" value="saat" checked="" style="position: absolute; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins></div>
<label class="control-label" style="margin-left: 5px;color:red;">Saat</label>
</div>
<div class="col-md-3" style="padding-left:15 !important;">
<div class="icheckbox_minimal-grey checked disabled" style="position: relative;"><input class="alanlar" type="checkbox" disabled="" name="gunlukAlanlar[]" value="Order Adı" checked="" style="position: absolute; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins></div>
<label class="control-label" style="margin-left: 5px;color:red;">Order Adı</label>
</div>
JQuery 库
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
JS代码
$("input[name='gunlukAlanlar[]']")[2].prop("checked", false);
但它不起作用。我希望未选中索引 2。但它不起作用。
【问题讨论】:
-
对不起,由于网络问题,我无法进入一些房子。我现在尝试。但没有解决问题
-
我更新了我的问题。请查看新图片
-
好的。我刚刚调整了我的答案。看看这对你有没有帮助。
-
比“不工作”更具体。怎么了?什么没有发生?你得到什么控制台错误?
-
无法再次使用 Kinglish。并且不会出现控制台错误。
标签: javascript jquery checkboxlist