用正则来验证手机号码格式是否正确 方法一:/^1(3|4|5|6|7|8|9)\d{9}$/ function checkPhone(phone){ let reg= /^1(3|4|5|6|7|8|9)\d{9}$/; if(!reg.test(phone)