-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (21 loc) · 712 Bytes
/
Copy pathindex.js
File metadata and controls
26 lines (21 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Import stylesheets
import './style.css';
// Write Javascript code!
const appDiv = document.getElementById('app');
appDiv.innerHTML = `<h1></h1>`;
//const canvas = document.getElementById('canvas');
//canvas.onclick = canvasClicked();
const buttonContainer = document.getElementById('buttonContainer');
const patternWidth = 20;
const patternHeight = 8;
for(var y = 0; y < patternHeight; y += 1)
{
for(var x = 0; x < patternWidth; x += 1)
{
var newInput = document.createElement("INPUT");
newInput.setAttribute("type", "checkbox");
newInput.setAttribute("class", "patternButton");
buttonContainer.appendChild(newInput);
}
buttonContainer.appendChild(document.createElement("BR"));
}