var table = document.createElement("table");

table.setAttribute("cellpadding","15");
table.setAttribute("border", "1");
table.style.borderCollapse = "collapse";
table.style.borderColor = "#ccc";
document.body.appendChild(table);
for (var i = 0; i < 9; i++) {
	table.appendChild(document.createElement("tr"));
	for (var j = 0; j < 9; j++) {
		table.children[i].appendChild(document.createElement("td"));
		table.children[i].children[j].innerHTML = (i + 1) * (j + 1);
		
	}

}
var c = table.querySelectorAll("tr:nth-child(2n)");
for (var i = 0; i < c.length; i++) {
	c[i].style.backgroundColor = "#efefef";
}
