Question: Write javascript and html code that will do the following: a. Make a header that says The Amazing Adder b. Create a div c. Inside
Write javascript and html code that will do the following:
a. Make a header that says "The Amazing Adder"
b. Create a div
c. Inside the div place 2 input fields, num1 and num2. Type will be text and size will be 3. Between them will be + sign and after them will display an = sign
d. Create a span called answer after the eqauls sign followed by a line break.
e. Make a button inside the div as well and attach a javascript function to it.
f. Create a javascript function within script tags (you do not need to seperate the file) that will grab the input from num1 and num2. Save their sum into a variable and update the html on the page so that their sum shows up in the answer span.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
