Recitation: HTML Forms and Javascript program
Purpose:
In this recitation you will create Javascript
programs that work with HTML forms. The HTML form gives the user a
familiar
user interface. Your Javascript program makes a useful computation and
returns the
result in the form. In this case, your form will convert a given number
of cents into
change (dollar bills, quarters, dimes, nickels, and pennies).
Work through these parts. As you work, post your questions and answers
here.
Review slides
Parts
- A simple HTML form
- The document object
- HTML form to convert change
- Javascript program to convert change
- Better text editors
Examples of Parts (ANSWERS)
View the HTML source to see the Javascript program
- Simple form
- Change color
- Change converter (form)
- Change converter (form and
Javascript)
The final change converter can be tested with this program. We will use
a similar program to test program 1.
- Change
Converter Tester