JSFiddle - React, Tailwind, and code Playground
HTML
<input type="number" value="" id="nmovimentos"/>
JavaScript
$(document).ready(function(){
var oldValue = $("#nmovimentos").val();
$("#nmovimentos").change(function(){
var newValue = $(this).val();
if (newValue > oldValue)
alert("increase!");
else
alert("decrease!");
});
});