JSFiddle - React, Tailwind, and code Playground

by opoe

HTML

<input type="text" id="field1"></input>
<input type="button" id="button1" value="add"></input>


<div id="outputdiv"></div>
<input type="button" id="buttonplay" value="play"></input>

CSS

#field1{
    background: #f4f4f4;
    border: solid 1px #7eb3f6;
    padding: 2px;
}

#field1{
    background: #f4f4f4;
    border: solid 1px #7eb3f6;
    padding: 2px;
}

#outputdiv{
 background: yellow;
 width:100px;
 height: 100px;   
    
}

JavaScript

$('#button1').click(function () {
   
$('#outputdiv').append($('#field1').val());
         });