We can create a search puzzle with a grid of random letters and numbers. Below is a 10x10 puzzle board. Use generate button to get the puzzle and find script at the end of this page.
123456789101112var
table = [];
for
(
var
i = 0; i < 10; i++) {
var
column =
""
;
for
(
var
j = 0; j < 10; j++) {
var
charDigit =
'ABCDEFGHIJKLMNOPQRSTUVXYZ0123456789'
;
var
randCharDigit = charDigit.charAt(parseInt(Math.random()*charDigit.length));
var
cell =
'<td>'
+ randCharDigit +
'</td>'
;
column += cell;
}
table.push(
'<tr>'
+ column +
'</tr>'
);
}
document.getElementById(
'tblRandCharDigit'
).innerHTML = table.join(
""
);
No comments:
Post a Comment