I am back with a problem again (please cooperate with my silly questions, i am very new to JavaScript). I am trying for understanding the concept of dynamic tables in JavaS
here's another solution using innerHTML
after that, just add the result to whatever element you want using innerHTML, for example, if you have:
then you can add the table to the element (inside any js function) like this:
var targetElement = document.getElementById('myElement');
targetElement.innerHTML = createTable();
otherwise, you can just delete the line:
return resultTable;
and add the table to the element directly inside the function, like this:
var target = document.getElementById('myElement');
target.innerHTML=resultTable;