Tick check box and enables submit button not working in IE6/7
I have the following code which is working开发者_如何学JAVA fine in firefox but ie just doesn't want to know:
$("#termsandconditionscontinue").attr("disabled", "disabled");
$("#agreeTandC").click(function() {
var checked_status = this.checked;
if (checked_status == true) {
$("#termsandconditionscontinue").removeAttr("disabled");
}
else {
$("#termsandconditionscontinue").attr("disabled", "disabled");
}
});
Here is the example: http://jsfiddle.net/zidski/LXGMu/
The problem can lie in
var checked_status = this.checked;
Change it to:
var checked_status = $(this).attr("checked");
to make sure you use proper jQuery object which is cross browser compatible.
精彩评论