Home > php教程 > PHP开发 > jQuery sets Easyui validation rules (recommended)

jQuery sets Easyui validation rules (recommended)

高洛峰
Release: 2016-12-06 10:27:47
Original
1286 people have browsed it

No more nonsense, let me just post the code for you. The specific code is as follows:

//JQuery EasyUI 动态改变表单项的验证规则
$(document).ready(function(){
$('#FILE_QUALITY').combobox({
onChange:function(newValue,oldValue){
if(newValue == 2){
$('#FRONT_FOR_UNIT').validatebox({
required: false
});
} else if(newValue == 0){
$('#FRONT_FOR_UNIT').validatebox({
required: true,
validType: 'length[1,512]'
});
}
$.parser.parse($("#FRONT_FOR_UNIT"));
}
});
});
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template