此处示例:
我需要填空:
HTML:
<div id="options">
<input type="radio" id="op_a" name="op" value="a" />
<label for="op_a">Option A</label>
<input type="radio" id="op_b" name="op" value="b" />
<label for="op_b">Option B</label>
<input type="radio" id="op_c" name="op" value="c" />
<label for="op_c">Option C</label>
</div>
<input type="button" id="disable_button" value="Disable Option B" />
JavaScript的:
$("#options").buttonset();
$("#disable_button").click(function(){
// What goes here to disable option B?
});
答案 0 :(得分:9)
$("#options").buttonset();
$("#disable_button").click(function(){
// What goes here?
$('#op_b').attr("disabled", "disabled");
$("#options").buttonset("refresh");
});