JSFiddle - React, Tailwind, and code Playground
by dauruk0512
HTML
test 1:<input type="text" id="quatity">
test 2: <input type="text" id="stock" value="5">
JavaScript
$("#keyboard").keyup(function(){
var keyboard = $(this).val();
var total = $("#total").val();
if ( parseInt(keyboard) > parseInt(total))
{
alert ('stock not enough');
}
//alert (keyboard);
});