JSFiddle - React, Tailwind, and code Playground
HTML
<div id="divContent">
<input type="text" name="txt1"></input>
</div>
CSS
input
{
margin-bottom: 10px;
width: 260px;
height: 20px;
}
JavaScript
var count = 1;
$(function() {
$('input').focus(function() {
addInputBox();
});
});
function addInputBox()
{
$('#divContent').append("<br />");
$('#divContent').append("<input type='text' name='txt" + count +"' onFocus='addInputBox();'></input>");
count++;
}