我有3个单选按钮
<div id="test"> <input type="radio" id="time1" name="radio" value="1" /><label for="time1">Test 1</label> <input type="radio" id="time2" name="radio" value="2" /><label for="time2">Test 2</label> <input type="radio" id="time3" name="radio" value="3" /><label for="time3">Test 3</label> </div>@H_404_4@在jquery
$("#test").buttonset();@H_404_4@之后,我想禁用它们(当然,禁用被放在if语句中)
$("#test input").attr("disabled",true); //or $("#test input").prop("disabled",true);@H_404_4@但它不起作用,按钮仍然启用.