0
hi,
try this html code:
add the reference of jQuery 1st
<!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>
<title></title>
<script src="jquery-1.9.1.js" type="text/javascript"></script>
</head>
<body>
<input id="Checkbox1" type="checkbox" />
<input id="Button1" type="button" value="button" />
<script type="text/javascript">
$("#Checkbox1").click(function () {
var checked_status = this.checked;
if (checked_status == true) {
$("#Button1").removeAttr("disabled");
} else {
$("#Button1").attr("disabled", "disabled");
}
});
</script>
</body>
</html>
0
try this:
$('#chkBox').click(function(){
$(this).is(':checked')?$('#button').removeAttr('disabled'):$('#button').attr('disabled','');
});
0
//////// checkbox/////
$("#CheckBox1").click(function () {
$("#Button1").attr("disabled", !this.checked);
});