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) {
        $('div#firstName').append(this.value);
    });
    
    $('button#getInput').click(function() {
    });
});