I *think* it depends on what number settings you have in your OS. But: for me, I can enter dots `.` into input fields. Which for my application, is undesired. I want to disable decimals, and everything that is not a number

As a bonus, jquery does not detect dots in number fields

<https://codepen.io/jossnaz/pen/dLMmoQ>

looks like this:

[![enter image description here](https://i.stack.imgur.com/ArWBh.png)](https://i.stack.imgur.com/ArWBh.png)

HTML:

```
Please type into the first input box some dots . then click out of the input box to trigger the change event <br> <br>
<input type="number" name="firstInput" value="....">
<input type="number" name="second" value="5">

<pre class="result"></pre>

```

Javascript:

```
$('input').on('change', function(){

  $('.result').html(
  'First input val: ' + $('input').first().val() + "<br/>" + "Second input val: "
  +   $('input').last().val()
);
})

```