您的位置:首页 > Web前端 > JQuery

jquery easyui动态校验,easyui动态验证

2016-01-27 16:48 525 查看
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

蕃薯耀 2016年1月27日 16:42:31 星期三
http://fanshuyao.iteye.com/
当select (name="orgType")改变时,修改input(name="orgCodeCg")的校验规则

<select class="easyui-combobox w110" name="orgType"
data-options="
required:true,
editable:false,
url:'${pageContext.request.contextPath}/backend/dictionary/getAll?tableName=T_ORG&columnName=ORG_TYPE&enableFlag=Y',
method:'post',
valueField:'columnValue',
textField:'description',
panelHeight:'auto',
onLoadSuccess: function (){
$(this).combobox('setValue', 4);
},
onChange: function(record){
var orgTypeValue = $(this).combobox('getValue');
if(orgTypeValue == '3'){
$(this).closest('tr').find('.orgCodeCg').textbox({
required: true
});
}else{
$(this).closest('tr').find('.orgCodeCg').textbox({
required: false
});
}
}
">
</select>


<td align="left" class="needParse">
<input class="w110 easyui-textbox ztrim orgCodeCg"    name="orgCodeCg" value=""
data-options="required:false"/>
</td>


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

蕃薯耀 2016年1月27日 16:42:31 星期三
http://fanshuyao.iteye.com/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: