I have a div, in which I will create an indeterminate number of tables which will have a non-numeric id, once these tables have been created I would like to go through them one by one and get their id as I will use it for later processes.
Is there any way to get the id of the table, either by JavaScript or by using the JQuery library? This is part of my script:
<script>
var div = document.getElementById('divTablas'); //un div que contiene un número n de tablas
for (var i = 1; i <= div.getElementsByTagName('table').length; i++) {
var idTabla = //como obtengo el id de la tabla que está recorriendo mi bucle?
}
</script>
Or is there some way to get an array with the id of the tables in my DIV, and then go through the array?