Skip to content

Instantly share code, notes, and snippets.

@StoneCypher
Created October 3, 2014 06:23
Show Gist options
  • Select an option

  • Save StoneCypher/8f62882f40f6ef2e71eb to your computer and use it in GitHub Desktop.

Select an option

Save StoneCypher/8f62882f40f6ef2e71eb to your computer and use it in GitHub Desktop.
function makeBoard(host, x, y) {
var i,j;
for (j=0; j<y; ++j) {
var div = document.createElement('div');
for (i=0; i<x; ++i) {
var inp = document.createElement('input');
inp.id = 'input_' + x.toString() + '_' + y.toString();
div.appendChild(inp);
}
host.appendChild(div);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment