Fix button generator

This commit is contained in:
Thomas A. Christensen II 2022-09-24 19:02:54 -05:00
parent f1879cb843
commit 51e18968c9

View file

@ -9,7 +9,7 @@
<input id="num-questions" type="number" value="15" />
</div>
<hr />
<button onClick="generate_quiz">Generate!</button>
<button id="generator">Generate!</button>
<hr />
<h2>Quiz</h2>
<ul id="quiz-terms"></ul>
@ -183,6 +183,8 @@
const terms_list = document.getElementById("quiz-terms");
function generate_quiz() {
terms_list.innerHTML = "";
let weights = [];
let types = [];
@ -556,6 +558,10 @@
"Iliopsoas"
];
document
.getElementById("generator")
.addEventListener("click", generate_quiz);
generate_quiz();
</script>
</body>