我正在使用Saplin DropDownCheckBoxes但它已选择所有问题的帽子我已经在Document.ready上编写了java脚本代码,它在Chrome浏览器中正常工作,具有所有正常功能,但在IE浏览器中无法正常工作请帮我在同一个
<%@ Register Assembly="DropDownCheckBoxes" Namespace="Saplin.Controls" TagPrefix="asp1" %>
<asp1:DropDownCheckBoxes ID="chkSubClient_Custom" runat="server" AddJQueryReference="true" UseSelectAllNode="true" Width="150px">
<Style2 SelectBoxWidth="150" /> </asp1:DropDownCheckBoxes>
Java脚本代码: -
$('input[type=checkbox]').change(function () {
debugger;
var Checked = 0;
var UnChecked = 0;
var OneUnChecked = 0;
var Count = 0;
$('input[type=checkbox]').each(function () {
if (this.name.indexOf("chkSubClient_Custom_sll") > 0) {
if (this.checked == true) {
Checked = 1;
}
}
});
$('input[type=checkbox]').each(function () {
if (Checked == 1) {
if (this.name.indexOf("chkSubClient_Custom") > 0) {
this.checked = true;
}
}
});
$('input[type=checkbox]').each(function () {
if (this.name.indexOf("chkSubClient_Custom_sll") < 0) {
if (this.name.indexOf("chkSubClient_Custom") > 0) {
if (this.checked == false) {
Count = 1;
}
}
}
});
$('input[type=checkbox]').each(function () {
if (this.name.indexOf("chkSubClient_Custom_sll") > 0) {
if (Count == 0) {
this.checked = true;
}
}
});
});
});
答案 0 :(得分:0)
试试这个
if ($(this).is(':checked'))
{
// more code
}