正则(输入框 input 限制,整数,表情,保留两位小数,type=number时maxlength不起作用,身份证和姓名加密),小程序替换为可换行
1.输入纯数字vardetail=e.detail.value;vardetail1='';if(detail){detail1=detail.replace(/[^\d]/g,'');}2.输入正整数vardetail=e.detail.value;vardetail1='';if(detail){detail1=detail.replace(/[^\d]/g,'');if(detail1==0