JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="txt-nric" value="" />
<input type="button" id="btn-nric" value="Click this button to get NRIC" />
JavaScript
$(document).ready(function() {
$("#btn-nric").click(function() {
var nric = $("#txt-nric").val();
});
});