JavaScript and forms
JavaScript typically used in combination with forms to validate input
simple ‘event’ model, e.g.
- use ‘onChange’ or ‘onClick’ methods to validate input before sending data to server-side CGI script
check that email addresses have ‘@’ in them
check that numbers contain only digits
check that mandatory fields are filled in