WDV221 Intro Javascript

Form Processing, Operators


Include a comment in each script with the exercise number and a description of what the script is supposed to do.


Instructions

Use the form fields for the input values. For each of the following exercises create a function what will be activated by the button.

For problems 1. and 2. display the resuts into the provided text fields.

For problems 3., 4. and 5. display the results in the span elements. Provide some CSS styling to highlight the displayed content.

The Reset button should clear all form fields and all display fields

Enter a number for value1:

Enter a number for value 2:

1. Display the value you entered for value1:

2. Dislplay the value you entered for value2:

3. Display the value of value1 * value2:

4. Display the results of value1 + value2 in the following textfield.

5. Use the increment operator to add 1 to count and display the new value of count.

6. Display a random number between 1 and 10.