Update learn.php

This commit is contained in:
2026-06-16 11:54:44 +02:00
parent 46b514eea6
commit 3da5b0aacd
+9 -6
View File
@@ -100,13 +100,11 @@ async function loadWord() {
*/
window.check = async function () {
const input =
document.getElementById("answer").value;
const input = document.getElementById("answer").value;
if (!currentWord) return;
const res =
await answerWord(currentWord, input);
const res = await answerWord(currentWord, input);
const result = document.getElementById("result");
@@ -114,11 +112,16 @@ window.check = async function () {
result.innerText = "Goed";
result.style.color = "green";
} else {
result.innerText = "Fout";
result.innerText =
`Fout — correct antwoord: ${res.correctAnswer}`;
result.style.color = "red";
}
loadWord();
await updateStats();
setTimeout(() => {
loadWord();
}, 800);
};
/**