JSFiddle - React, Tailwind, and code Playground
HTML
<h2></h2>
<form id="send" action="#" method="POST">
<input type="text" id="x"><br/>
<input type="text" id="y">
<input type="submit">
</form>
JavaScript
$(document).ready(function(){
$('#send').submit(function(){
var x = $('#x').val();
var y = $("#y").val();
if(x <= y){
$('h2').html("Done.");
}else{
$('h2').html("Sorry,not enough cash.");
}
event.preventDefault();
});
});