jquery easyui 验证Combo和ComboBox

 

 <select id="Select1" name="Select1"
                                class="easyui-combobox easyui-validatebox"
                                editable="false" panelHeight="100"
                                url="../Base/SysCategory.aspx?ID=24" 
valuefield="ParameterID" textfield="ParameterName" required="true" 
validtype
="selectRequired['Select1']" >

 

$.extend($.fn.validatebox.defaults.rules, {
    selectRequired: {
        validator: function (value, param) {
            var selectVal = $("input[name=" + param[0] + "]").val();
            $("#msg").html(selectVal);
            return parseInt(selectVal) > 0;
        },
        message:'请选择'
    }
}

 

 

posted @ 2013-03-27 16:42  百里水上  阅读(1385)  评论(0编辑  收藏  举报