You wish to create a (very) simple prototype of a company's shipping cost estimator. To do so, ask the user the weight of the item they are shipping.
We will assume that all items are less than 5 pounds, so you don't have to go beyond that in your code.
Also, if they are a member of the company's "Frequent Shipper" program they get $3 deducted from their shipping cost.
1. See the HTML code with the title: "Common Shipper" attached to the end of this exam.
2. Write a function that will examine the text field that asks for the weight of the item. Retrieve this value.
3. Examine the radio button asking if the user is a member of the frequent shipping program. If they checked 'Yes' then reduce the cost of their shipping by $3.
4. Output their shipping cost inside the div section labeled 'output' below*.
< html lang="en" >
< head >
< meta charset="utf-8" >
< title >Common Question IT-130 < /title >
< script type="text/javascript" >
// YOUR FUNCTION WOULD GO HERE
< /script >
< /head >
< body >
< h1 >Common Question IT-130 < /h1 >
< hr >
Are you a member of our Frequent Shipping program? < br >
Yes < input type="radio" name="radFreqShip" id="freq" > < br >
No < input type="radio" name="radFreqShip" id="notFreq" > < br >
< input type="button" value="Calculate Shipping Cost" onclick="calcShipping()" >
< div id="output" >
< /div >
< /html >