I have the following html5 input element:
<input type="number">
Why does this input allow for the character 'e' to be entered in the input field? No other alphabet character is able to be entered (as expected)
Using chrome v. 44.0.2403.107
To see what I mean: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_number
HTML input number type allows "e/E" because "e" stands for exponential which is a numeric symbol.
Example 200000 can also be written as 2e5. I hope this helps thank you for the question.
We can make it So simple like below
Because that's exactly how the spec says it should work. The number input can accept floating point numbers, including negative symbols and the
e
orE
character: