JSFiddle - React, Tailwind, and code Playground
HTML
<table id="table"></table>
JavaScript
$('#table').on('click', '.download', function() {
alert(this.id);
});
var html = "";
for(var i = 0; i <10; i++) {
html += "<input id='" + ('test'+i) + "' class='download' type='image' width='25px' height='25px' src='/download.png'/>";
}
$("#table").append(html);