JSFiddle - React, Tailwind, and code Playground
by Qwerty_Wasd
JavaScript
function tableCreate(){
var body = document.body,
tbl = document.createElement('table');
tbl.id = `table-tmp`;
tbl.style.tableLayout='fixed';
tbl.style.margin='auto';
for(var i = 0; i < 10; i++){
var tr = tbl.insertRow();
// tr.appendChild(document.createTextNode(i));
// tr.style.width = '0px';
for(var j = 0; j < 10; j++){
var td = tr.insertCell();
td.style.height = '16px';
td.style.width = '16px';
td.style.background= "url('rId9.png')";
td.style.backgroundRepeat = 'no-repeat';
td.style.backgroundSize = '100%';
td.setAttribute('class', 'cell');
td.setAttribute('id', i+''+j);
// td.appendChild(document.createTextNode());
td.style.border = '1px solid black';
}
}
body.appendChild(tbl);
}
tableCreate();
window.addEventListener('load', function(){
document.
});
// var a = document.getElementById("01");
// alert(a.style.background );