I need to enter pure numbers in an input box, so I take it for granted that I write
<input type="number" >
then found that it is possible to enter mathematical symbols such as e and decimal point. Look it up on the Internet, and modify it as follows
<input type="number" v-model="fromSize" onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))">
but found that it still has no effect, or you can enter e and decimal point and mathematical symbols, I would like to ask how to solve this?