<input type="number" onkeydown="typ(event)"> <script> function typ(event){ return event.keyCode !== 187 && event.keyCode !== 189 && event.keyCode !== 69; } </script>