I am trying to create a question and answer quiz, depending upon previous question. So if the user clicks yes, the previous question disappears from the screen and a new question is displayed on the screen, a different question if no is clicked. Any help is much appreciated. Thank you.
Code:
<!DOCTYPE html>
<html>
<body>
<p>Is the answer to this question Yes or No?</p>
<button onclick="myFunction1()">Yes</button>
<button onclick="myFunction2()">No</button>
<p id="demo"></p>
<script>
function myFunction1() {
}
function myFunction1() {
}
</script>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire