Restricting Characters in Input Field to a Set of Characters

前端 未结 3 928
梦如初夏
梦如初夏 2021-01-04 08:53

Question Update: How can I prevent all characters except for the ones specified in a char array from being typed into an input field using AngularJS (or jQu

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-04 09:03

    Try to use regExp to filter unnecessary characters on ng-keypress by passing $event.

    # It'll be more clear in plnk!

提交回复
热议问题