如何查找元素复选框和检查,是否使用jquery检查? [英] How to find element checkbox and check, is checked or not using jquery?
问题描述
大家好,
我有一个asp.net页面,其中我有一个转发器,在这个转发器中我绑定了86行数据,并且我每行都有一个复选框。
如果用户选中了复选框,那么它将仅保存这些行数据。
i'我可以找到复选框,jquery
Hi guys,
I have an asp.net page, in which i have a repeater, in this repeater i'm binding 86 rows of data, and i have one checkbox in each row.
if the user checked the check box then it will save those rows data only.
i'm able find out the checkbox, jquery
$("#tBodyVT .trvtRow").each(function () {
var chk = $(this).find(".chk");
});
但是无法检查,是否检查过?< br $> b $ b
我尝试过:
but not able to check, is checked or not?
What I have tried:
if(!$(this).is(':checked'))
if ($(this).is(':not(:checked)'))
if ($(this).attr('checked') == false)
var checked = $(this).is(':checked');
if (checked) {
alert('checked');
} else {
alert('unchecked');
}
i尝试了所有这些代码,但没有得到。
请各位帮帮我。
谢谢
i tried all these code, but didn't get.
Please guys help me.
Thanks
推荐答案
(#tBodyVT .trvtRow ).each(function(){
var chk =
("#tBodyVT .trvtRow").each(function () { var chk =
(this).find(。chk);
});
(this).find(".chk"); });
但无法检查,是否检查过?
什么我试过了:
but not able to check, is checked or not?
What I have tried:
if(!
(this).is( ':checked'))
if(
(this).is(':checked')) if (
这篇关于如何查找元素复选框和检查,是否使用jquery检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!