I am in the process of creating two tables dynamically using JScript. Instead of using the traditional method of separating them with assigned tags in HTML, I have approached the creation of the first table in a different way:
function makeCells() {
var t = document.createElement("TABLE");
for (var rows = 0; rows < 8; rows++) {
var newRow = document.createElement("TR");
console.log(newRow);
t.appendChild(newRow);
for (var cols = 0; cols < 8; cols++) {
var newCell = document.createElement("TD");
newRow.appendChild(newCell);
}
}
document.body.appendChild(t);
}
Now, I am faced with the task of creating a second table with a different name and tag, in order to apply separate CSS statements to each. How can I achieve this in my JScript code?