Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me to solve this problem again. To create HTML and JavaScript and answer should display 4 FUNCTIONS and 2 RETURNS only and no

Please help me to solve this problem again. To create HTML and JavaScript and answer should display 4 FUNCTIONS and 2 RETURNS only and no extra code of function. Teacher recommend everything using the question giving.

image text in transcribed

THANK YOU.....

Requirements D Create an HTML file and an external JavaScript file D Add your name to the name of both file (for example, JohnSmith_Lab4.html) D Use comments to add the following information inside your JavaScript 1. Author's name 2. Date 3. Purpose of the program Add more comments as needed D Create four functions in your script 1. calcRectangle Area0 Gets the values from the screen. It calculates the area of the rectangle, and RETURNS a value. 2. displayRectangle Area0 Calls calcRectangle Area0. Then, it displays the value on the screern. 3. calcTriangleArea Gets the values from the screen. It calculates the area of the triangle, and RETURNS a value. 4. displayTriangleArea0 Calls calcTriangle Area). Then, it displays the value on the screen. D Please pay attention to all bold RETURN words D Add comments for each function to explain what it does D Do not use any global variables, All variables must be local D You must follow naming conventions This might help 1. Use asterisk (*) as multiplication operator 2. Use slash (/) as division operator 3. This line of code in JavaScript gets the value from the textbox on the screen. The parseFloatO function converts the value to a floating point type height-parseFloat (frmCalculator ttHeight value): height is a variable name. frmCalculator is the name of the form I created in HTML. txthleight is the name of the textbox I created 4. This line of code adds the value to the screen: frmCalculator ttAreavalue "Rectangle: "+ area

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions