Question: HTML/Javascript/CSS question how could i generate the colors red and blackfor a checkers board game pattern inside table cells using css? function for javascript is
HTML/Javascript/CSS question
how could i generate the colors red and blackfor a checkers board game pattern inside table cells using css?
function for javascript is as follows:
function tableFunction() { var newTable = document.getElementById("checkersTableDiv"); newTable.innerHTML = genTable(); } function genTable() {
var table = ' '; var rows = 8; var columns = 8; for(var i = 0 ; i < rows; i++) { table += '
for(var j = 0; j <= columns; j++) {
table += '
} table += '
return html; }
HTML code if needed:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
