JSFiddle - React, Tailwind, and code Playground
HTML
<form id="test">
<input type="text" name="one" />
</form>
<a id="add" href="#" />add input</a>
JavaScript
$('body').on('keyup', 'input', function() {
newval = $(this).val().replace(/[^0-9.]/g, "");
$(this).val(newval);
});
$('#add').on('click', function(e) {
e.preventDefault();
$('#test').append('<input type="text" />');
});