Skip to content

Commit

Permalink
Start button
Browse files Browse the repository at this point in the history
  • Loading branch information
nayakrujul committed Nov 1, 2023
1 parent ed86268 commit 2a43e37
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
Binary file modified .github/.DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ th {
td {
padding-right: 10px;
padding-top: 5px;
}

input[type=button] {
background-color: #606060;
color: #bbbbbb;
font-size: 20px;
}
21 changes: 20 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
let lst = words.split("\n").map(l => l.split("\t"));
console.log(lst);

// const h1 = document.querySelector("h1");
// if (h1.innerHTML !== "VTP6") {
// alert("Error!");
// throw new Error();
// }

function random_choice(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}

function start() {
document.getElementById("tbl").hidden = true;
document.getElementById("btn").hidden = true;
}

let btn = document.createElement("input");
btn.setAttribute("type", "button");
btn.setAttribute("value", "Start");
btn.onclick = start;
btn.id = "btn"
document.body.appendChild(btn);

document.body.appendChild(document.createElement("br"));
document.body.appendChild(document.createElement("br"));

let table = document.createElement("table");
table.id = "tbl";

let head = document.createElement("tr");
head.innerHTML = `<th>Term</th> <th>Definition</th>`
Expand Down

0 comments on commit 2a43e37

Please sign in to comment.