验证jquery easyui中的单选按钮

时间:2013-09-05 08:00:07

标签: jquery validation jquery-easyui

如何在jquery easyui的单选按钮上应用验证?或者有没有办法在jquery easyui中默认检查一个单选按钮?

<input type="radio" name="degree_status" value="Completed" class="easyui-validatebox" checked="checked" /> Completed
<input type="radio" name="degree_status" class="easyui-validatebox" value="In Progress" /> In Progress

1 个答案:

答案 0 :(得分:0)

您可以预先选择单选按钮

$(document).ready(function() {
    var $radios = $('input:radio[name=degree_status]');
    $radios.filter('[value=Completed]').prop('checked', true);
});