jqGrid是一款基于jQuery比较优秀的表格组件。
editrules="{number:true, required: true, custom: true, custom_func: phoneNumCheck}" function phoneNumCheck(val, nm) { if(!/1[0-9]{10}/.test(val)) { return [false, nm + "只能填写11位数字!"] } else { return [true, ""]; } } 上面的代码是使用正则表达式来校验是否为手机号。
navigator="true" navigatorDelete="false" navigatorSearch="false" navigatorEdit="false"
$("#invoiceListGrid").trigger("reloadGrid");