Posts

Showing posts from May 20, 2019

quiz

All the best my dear friends
All the best my dear friends Copy the entire text BELOW THIS STATEMENT. Then replace the text in pink with your own text, while leaving the blue text intact. Save the document as "documentname.html" (e.g., quiz1.html), and you are ready to post it on your server! multiple-choice quiz form Vocabulary Quiz I Check the answer to each multiple-coice question, and click on the "Send Form" button to submit the information. 1. The word which means "house" is: maison quatre soleil poisson 2. The word which means "fish" is: maison valise soleil poisson 3. The word which means "suitcase" is: renard valise soleil poisson
Here's the HTML: Get Results Next, we'll create a function to generate a quiz. Your function will need these inputs: The quiz questions A place to put the quiz A place for the results A submit button And if you put those things in, the function should spit out a fully-formed quiz. The JavaScript structure: function generateQuiz(questions, quizContainer, resultsContainer, submitButton){ function showQuestions(questions, quizContainer){ // code will go here } function showResults(questions, quizContainer, resultsContainer){ // code will go here } // show the questions showQuestions(questions, quizContainer); // when user clicks submit, show results submitButton.onclick = function(){ showResults(questions, quizContainer, resultsContainer); } } If you look closely at the JavaScript structure, you'll see that our generateQuiz function contains helper functions to show the quiz, accept submissions, and show the results. Step 2: Show the questions First...