驗證密碼:6位到16位之間,由數字和字符組成,且必須包含大、小寫字母和數字

第一種 使用直接正則判斷 var re = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,10}$/ 第二種 正則加邏輯判斷 <input type="text" id="input" onkeydown="checkInput(event)"> <script> function checkInput(e) { if (e.keyCode == 13
相關文章
相關標籤/搜索