WDV221 Intro Javascript

Calculations and Textfields - Homework 3

Use Javascript functions and the onclick event handler to perform the following tasks using this form.

Field 1:

Field 2:


Enter an amount:

Display Balance::

1. Create a global variable called accountBalance. Initialize it to 0.

2. Create function that will perform the process described in each button.

3. Display the results of the button functions in the Display Balance field.

4. Use the combined operator as needed.

5. Use parseInt( ) or parseFloat( ) as needed.