angularjs 正則判斷用戶輸入的內容只能是數字或者字母

<input class="form-control" placeholder="請輸入英文和數字" type="text" ng-model="edition" ng-pattern="/^[0-9a-zA-Z]+$/">
相關文章
相關標籤/搜索