Question: Open main.js file and inside the jQuery ready function create an event handler that would run once the Calculate Area button of the form is
Open main.js file and inside the jQuery ready function create an event handler that
would run once the Calculate Area button of the form is clicked. The event handler
should do the following tasks:
Retrieve the value of the Precision drop box and save it in a variable called p
Debugging step: Open your index.html in the browsers debugger watch the
value of p and be sure that the correct value is retrieved for all possible precision
values.
Retrieve the user entered value of the radius text field and save it in a variable
called r
Debugging step: Open your index.html in the browsers debugger watch the
value of r and be sure that the correct value is retrieved.
Compute the area of the circle using the function computearea giving it the radius
value just retrieved.
Debugging step: Open your index.html in the browsers debugger watch the
value of a and be sure that the correct value is computed.
Produce the computed area, a to the area text field with a precision of p
Debugging step: Open your index.html in the browser. Test the area with
different radius and precision values
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
