JSFiddle - React, Tailwind, and code Playground
by stevea
HTML
Name<input id='fname'>
<div id='firstName'></div>
<button id="getInput"> Get Input </button>
CSS
div#firstName {
width:100px;
height:20px;
background-color:beige;
}
JavaScript
$(function() {
$('input#fname').change(function(e) {
debugger;
$('div#firstName').append(this.value);
});
$('#getInput').click(function() {
debugger;
$('div#firstName').append(this.value);
});
});