HW3
Table of Contents
1 HW3: Validate Forms
- Write HTML forms
- Use Javascript to validate them
- Use Javascript to create content
3 Assignment
- Create a madlib form with
text
field- numeric
text
field radio
buttons- More than 1
checkbox
select
inputlabel
tags for all inputssubmit
input
- on submit, write javascript that checks the input
- Make sure all inputs are filled in
- Make sure numeric field only has numbers (even if numeric input)
- Do not display story if there are errors
- after validating insert HTML into the page to write your story
4 madlib.html
- Simple starting point
- Includes jQuery if you wish to use it
5 Reading
- Extra Javascript resources
- This class is on the concepts, you do not need to be a JS expert
5.1 Example notes
- Composability of JS, CSS, DOM important
- But no tests on all the methods for an HTML element
6 Extra Credit
- Write a credit card checksum validator using the Luhn algorithm