1.手機號正則表達式:
/^[3-9]{1}[0-9]{9}$/.test(phone)
2.驗證碼四位純數字:
//取后面四位 Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * 10 ** (4-1))
1.手機號正則表達式:
/^[3-9]{1}[0-9]{9}$/.test(phone)
2.驗證碼四位純數字:
//取后面四位 Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * 10 ** (4-1))
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。