How to block +,-,e in input type Number?

后端 未结 13 1839
我在风中等你
我在风中等你 2020-12-29 20:52

When I\'m giving input type number the letter e and special charecters are also displaying in input field. I want to display only digits. How to block them?

13条回答
  •  粉色の甜心
    2020-12-29 21:16

    Since OP's question was tagged with 'angularjs', the cleanest solution would probably be to use a directive. Several solutions for this approach have previously been explained here:

    angularjs: allows only numbers to be typed into a text box

提交回复
热议问题