Assignment 5
Create
a JavaScript that will do the following:
In assignment
3 you used a form to get the users name so it could be written to a
document. In this assignment you will use a form to get the user to
input 2 numbers then upon the user clicking on the total button, the
sum is displayed in the bottom form. Use the layout below as a guide:
In order
to do this assignment you will have to call the function when the user
clicks on the total button. The function itself will first declare the
variables, calculate the total, then write the total to the screen.
HINT:
document.form1.total.value=a*1+b*1
(will add variable a and b together and display the sum in form1 of
the document which was named total)
Save
as: A5YourName.html