赞
踩
check = function(value){
const regStr = /[^u4E00-u9FA5|d|a-zA-Z|rns,.?!,。?!…—&$=()-+/*{}[]]|s/g
if(regStr.test(value)){
return false;
}else{
return true;
}
}
那这个方法做oninput的校验就好了
返回true 说明是合理字符
如果返回false
则表示用户输入的内容不符合规范
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。