JSFiddle - React, Tailwind, and code Playground

HTML

<input id="number" type="number" value="1">
<button id="getValue">Get Value</button>

<div id="output">Enter a string in the number input above and hit "Get Value". Note how it allows you to enter the non-numeric character, but will not let you programatically access the value. </div>

JavaScript

$('#getValue').click(function() {
    $('#output').html($('#number').val());
});