Facts include state capital, date admitted into the union, state flower, and state bird. This script creates a JavaScript Quiz. Answers are selected by using drop-down menus, then submitted by clicking a button. Incorrect responses receive a check mark. This script creates a JavaScript Survey.
Users answer a number of questions, then click on the submit button.
A mailto form automatically pops up, allowing the survey taker to send along their results. An excellent use of regular expressions for the initial validation routine as well. Also includes logical checks for invalid dates such as March 32 or February 29 if it is not a leap year. Validation SSN Determines if the social security number the user enters is of the right length and then if it is valid or not. The user is alerted if any information is invalid and asked to try again.