-3
function populateN() {
var nNumbers = [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45];
var i = 0;
for (i = 0; i < 5; i++) {
var tempString = "r" + (i + 1) + "c3";
var temp1 = nNumbers.length;
var temp2 = Math.floor(Math.random() * temp1);
var temp3 = nNumbers[temp2];
document.getElementById(tempString).innerHTML = temp3;
nNumbers[temp2] = nNumbers[0];
nNumbers.shift();
}
}
你怎麼覆蓋表格單元格「R3C3」與「自由」的Javascript賓果「自由」空間
'document.getElementById(「r3c3」)。innerHTML =「FREE」'在循環之後? – nnnnnn