JSFiddle - React, Tailwind, and code Playground
HTML
<div id= "get_div"></div>
<input type="button" Value="TestBtn" />
JavaScript
$(document).ready(function() {
var html= '<form>'
html += '<textarea name="test" id="test"></textarea>';
html += '<textarea name="test1" id="test1"></textarea>';
html += '</form>';
$('#get_div').append(html);
$("input").click(function() {
alert($('#test').val());
});
});