Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Online Quiz</title>
- <script type="text/JavaScript">
- function checkAnswers()
- {
- // determine whether the answer is correct
- if ( myQuiz.radiobutton[1].checked )
- document.write( "Congratulations, your answer is correct" );
- else // if the answer is incorrect
- document.write( "Your answer is incorrect. Please try again" );
- }
- </script>
- </head>
- <body>
- <form id="myQuiz" action="JavaScript:checkAnswers()">
- <p>Select the name of the tip that goes with the image shown:<br />
- <img src="EPT.gif" width="108" height="100" alt="mystery tip"/>
- <br />
- <input type="radio" name="radiobutton" value="CPE" />
- <label>Common Programming Error</label>
- <input type="radio" name="radiobutton" value="EPT" />
- <label>Error-Prevention Tip</label>
- <input type="radio" name="radiobutton" value="PERF" />
- <label>Performance Tip</label>
- <input type="radio" name="radiobutton" value="PORT" />
- <label>Portability Tip</label><br />
- <input type="submit" name="submit" value="Submit" />
- <input type="reset" name="reset" value="Reset" />
- </p>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement