Jquery value of checkbox always return on
This question already has an answer here:
var returnCheck = $('#closed-' + rowCounter).is(':checked');
将返回您当前的复选框状态。
Get the checked
property using the .prop()
method instead. It will return a boolean.
var closedIssue = $('#closed-' + rowCounter).prop('checked');
Or plain JavaScript:
var closedIssue = document.getElementById('closed-' + rowCounter).checked;
链接地址: http://www.djcxy.com/p/55986.html
上一篇: 获取选中的引导复选框的值
下一篇: 复选框的Jquery值总是返回