T his example brings us back to forms. The program will use JavaScript to validate a user's data entry, which is often sloppy. In this example we will make the user enter a first name and we will require a zip code to be either 5 or 10 characters in length. We will also make sure that the first 5 characters are digits. This is a little more difficult than some, but hang in there.
Data validation is an important issue for programmers.
This example re-introduces the length property. This program also shows you a longer function than you've seen before. The Script's Effect Click here to open a new window demonstrating data entry validation. Close the window to return to this document. The script is quote basic.