Lesson 04 – JAVASCRIPT & FORMS
WORK
QUESTION 1
Create a form
with 5 text fields. Use a script to add
the name of a movie into each text field.
(Each text field should contain a different movie name.)
QUESTION 2
Use the form from
the previous lesson. When the OK button
is clicked, the text field at the bottom should get “Hello Name” where Name is
the name that was typed in the top text field.

QUESTION 3
Use the form from
the previous lesson.
- When Clear is hit, the text field’s
value is set to nothing. To do
this, we simply set it to “”.
- When any number or operator (other
than =) is hit, that character is added to the text field. So, if 4 is hit, then 4 is added to the
text field.
- When the = button is hit, you will
use the built-in eval function to evaluate the mathematical expression in
the text field. The answer will be
placed in the text field as well.
(You will likely find this challenging to do. Your teacher will help.)
