JSFiddle - React, Tailwind, and code Playground

by fenderistic

HTML

<button id="add">Add Addresses</button>
<div id="addresses"></div>

JavaScript

var count=1;
$("#add").click(function(){
    var html="<div id='div"+count+"'><input type='text' id='add'"+count+"'></input><button onclick=foo('"+count+"') class='rm"+count+"'>Remove</button></div>";
    $("#addresses").append(html);
    count++;
});