私のチェックボックスリストでチェックボックスを有効にしようとしています。私の解決策では動作しない唯一のことは、IE9でのスパンからのdisabled属性を削除することです、それはFFで動作します。checkboxlistでチェックボックスを有効にしようとしていますか?
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
function enablebut() {
$('#CheckBoxList1_0').removeAttr('disabled');
$('#CheckBoxList1_0').closest('span').removeAttr('disabled');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<button onclick="enablebut();">enable</button>
<div>
<asp:CheckBoxList ID="CheckBoxList1" Enabled='false' runat="server">
<asp:ListItem Text="een"></asp:ListItem>
<asp:ListItem Text="twee"></asp:ListItem>
</asp:CheckBoxList>
</div>
</form>
</body>
</html>
IE9では動作しません: – user603007