Fix button generator
This commit is contained in:
parent
f1879cb843
commit
51e18968c9
1 changed files with 7 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
||||||
<input id="num-questions" type="number" value="15" />
|
<input id="num-questions" type="number" value="15" />
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<button onClick="generate_quiz">Generate!</button>
|
<button id="generator">Generate!</button>
|
||||||
<hr />
|
<hr />
|
||||||
<h2>Quiz</h2>
|
<h2>Quiz</h2>
|
||||||
<ul id="quiz-terms"></ul>
|
<ul id="quiz-terms"></ul>
|
||||||
|
@ -183,6 +183,8 @@
|
||||||
const terms_list = document.getElementById("quiz-terms");
|
const terms_list = document.getElementById("quiz-terms");
|
||||||
|
|
||||||
function generate_quiz() {
|
function generate_quiz() {
|
||||||
|
terms_list.innerHTML = "";
|
||||||
|
|
||||||
let weights = [];
|
let weights = [];
|
||||||
let types = [];
|
let types = [];
|
||||||
|
|
||||||
|
@ -556,6 +558,10 @@
|
||||||
"Iliopsoas"
|
"Iliopsoas"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
document
|
||||||
|
.getElementById("generator")
|
||||||
|
.addEventListener("click", generate_quiz);
|
||||||
|
|
||||||
generate_quiz();
|
generate_quiz();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue