`

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

阅读更多

 

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

蕃薯耀 2016年1月27日 16:42:31 星期三

http://fanshuyao.iteye.com/

 

当select name="orgType")改变时,修改inputname="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/

 

1
2
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics