html input輸入限制小於100的正整數

原文出處:http://www.myexception.cn/h/570505.htmlhtml 經過正則的方式進行數字有效性的驗證,下面代碼能夠實現標題描述功能: this <script> function checkInt(n,max){ var regex = /^\d+$/; if(regex.test(n)){ if(n<max && n>0){
相關文章
相關標籤/搜索