Update
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user