I'm filling a pivot table with an array, but I can't add the delete button in another column of the table
my arrangement
const response = [
"elemento1",
"elemento2"];
So I fill the table
load("files", function (response) {
var botones = document.getElementsByClassName('eliminaFile');
multipleFileUploadError.style.display = "none";
var content = "<p>Archivos Cargados: </p>";
response.forEach((file, index) => rollCall(file, index));
response.sort();
let table = document.getElementById("tabla");
//aquí recorro mi arreglo
for (var i = 0; i < response.length; i++) {
//aquí lleno la primer columna
table.innerHTML += "<tr><td><a href='" + response[i] + "' target='_blank'>" response[i]+ "</a></td></tr>";
//aqui intento crear la otra columna con el botón eliminar
// content += "<p>Descargar Archivo : <a href='" + response[i] + "' target='_blank'>" + response[i] + "</a></p>" + "<input class='eliminaFile' type='button' id='" + response[i] + "' value='Eliminar'>";
}
multipleFileUploadSuccess.innerHTML = content;
multipleFileUploadSuccess.style.display = "block";
});
this is the html of the table
<table class="demo">
<thead>
<tr>
<th>Archivo</th>
<th>Acciones</th>
</tr>
</thead>
<tbody id="cuerpoTabla">
</tbody>
</table>
I want to add the delete button and delete the element that was selected but I can't