我有如下代码:
$(document).ready(function(){
$(".trHide input:radio").attr('disabled',true);
});
<tr>
<td><ul type="circle">
<li>9. Capacité à rendre compte</li>
</ul></td>
<td></td>
<td><input class="validate[required] radio" type="radio" name="number9" value="1" <?php if($value['9.CapasityRendre'] == 1):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number9" type="radio" value="2" <?php if($value['9.CapasityRendre'] == 2):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number9" type="radio" value="3" <?php if($value['9.CapasityRendre'] == 3):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number9" type="radio" value="4" <?php if($value['9.CapasityRendre'] == 4):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number9" type="radio" value="5" <?php if($value['9.CapasityRendre'] == 5):?>checked='checked'<?php endif; ?>></td>
</tr>
<tr class="trHide">
<td><ul type="circle">
<li>10. Capacité à faire des choix et à prendre des décisions</li>
</ul></td>
<td></td>
<td><input class="validate[required] radio" type="radio" name="number10" value="1"<?php if($value['10.CapaciteFair'] == 1):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number10" type="radio" value="2"<?php if($value['10.CapaciteFair'] == 2):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number10" type="radio" value="3"<?php if($value['10.CapaciteFair'] == 3):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number10" type="radio" value="4"<?php if($value['10.CapaciteFair'] == 4):?>checked='checked'<?php endif; ?>></td>
<td><input class="validate[required] radio" name="number10" type="radio" value="5"<?php if($value['10.CapaciteFair'] == 5):?>checked='checked'<?php endif; ?>></td>
</tr>
我需要:
我想禁用 tag 中的所有单选框<tr class="trHide">
。
问题:
它不起作用。我将如何解决这个问题?请任何人帮助我,谢谢。