This commit is contained in:
2019-07-11 14:29:00 +02:00
parent c6e0229aa1
commit 3c9a36acb7

View File

@@ -35,7 +35,7 @@
<div id="screen3">
Du hast <span id="right"></span> von <span id="total"></span> Fragen richtig
<button>Neues Spiel starten</button>
<button id="newgame">Neues Spiel starten</button>
</div>
<script>
@@ -71,6 +71,11 @@ function listener() {
}
//Start a new game
function newGame() {
window.location = "http://134.2.6.146/~zxmpy88/uebung10/quiz.html";
}
function showQuestion() {
var question = questions[currentQuestion];
@@ -92,7 +97,9 @@ function answerQuestion(event) {
console.log(target.nodeName);
if (target.id.substr(-1) == question.solution) { console.log("richtig"); target.style.backgroundColor = "green";
if (target.id.substr(-1) == question.solution) {
console.log("richtig");
target.style.backgroundColor = "green";
rightAnswers++;
} else {
target.style.backgroundColor = "red";