1. Add JavaScript to the square problem such that it computes the area, perimeter or both when the length and width are given and the appropriate button is pressed. Make sure to make all buttons functional. Rename to exam4sample21.html Input File: Output File: rectangle.html exam4sample21.html 2. Add input validation such that the proper error is generated when the input field is not a number. Rename to exam4sample22.html Use input form validation as follows: onclick "if(isInteger('inputl')) compute('inputl');" function isInteger(id) var flagetrue; var x-document.getElementBy Id(id); if (x.valuenuit || x.value") else if (x.value") else if (isNaN(x.value)) else if ((parseFloat (x.value))1 =0 ) { alert("Value Is Not An Integer"); flag-false;) return flag; ( alert("Integer Field Empty");flag=false;) i alert("Value Not A Number"); flag=false;} Input File: Output File: exam4sample21.html exam4sample22.html 3. Add onfocus functionality to the input field stating "Enter Number Here". Rename to exam4sample23.html. (20pts) Input File: Output File: exam4sample2.html exam4sample3.html 4. Convert the JavaScript code from #3 to be in 00P format instead. Rename to exam4sample24.html. Input File: Output File: exam4sample23.html exam4sample24.html 5. Modify the application from #4 to use DOM standard event addEventListener. Rename to exam4sample25.html. Input File: Output File: exam4sample24.html exam4sample5.html 6. Change the application from #5 to dynamically display the form using DOM innerHTML. Rename to exam4sample26.html. (20pts) Input File: Output File: exam4sample25.html exam4sample26.html

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
RECTANGLE PROBLEM
Enter Length:
Enter Width:
Area:
Perimeter:
Area
Perimeter
|Both
Clear
1. Add JavaScript to the square problem such that it computes the area, perimeter
or both when the length and width are given and the appropriate button is pressed.
Make sure to make all buttons functional. Rename to exam4sample21.html
Input File:
Output File:
rectangle.html
exam4sample21.html
2. Add input validation such that the proper error is generated when the input
field is not a number. Rename to exam4sample22.html
Use input form validation as follows:
onclick="if(isInteger(ʻinputl')) compute('inputl');"
function isInteger(id)
var flag=true;
var x=document.getElementById(id);
if (x.value==nuii || x.value=="")
else if (x.value==")
else if (isNaN (x.value))
else if ((parseFloat (x.value))$1 !=® ) { alert("Value Is Not An Integer");flag=false;}
return flag:
{ alert("Integer Field Empty");flag=false;}
i alert("Value Not A Number"); flag=false;}
Input File:
Output File:
exam4sample21.html
exam4sample22.html
3. Add onfocus functionality to the input field stating "Enter Number Here".
Rename to exam4sample23.html.´ (20pts)
Input File:
Output File:
exam4sample2.html
exam4sample3.html
4. Convert the Javascript code from #3 to be in 00P format instead. Rename to
exam4sample24.html.
Input File:
Output File:
exam4sample23.html
exam4sample24.html
5. Modify the application from #4 to use DOM standard event addEventListener.
Rename to exam4sample25.html.
Input File:
Output File:
exam4sample24.html
exam4sample5.html
6. Change the application from #5 to dynamically display the form using DOM
innerHTML. Rename to exam4sample26.html. (20pts)
Input File:
Output File:
exam4sample25.html
exam4sample26.html
Transcribed Image Text:RECTANGLE PROBLEM Enter Length: Enter Width: Area: Perimeter: Area Perimeter |Both Clear 1. Add JavaScript to the square problem such that it computes the area, perimeter or both when the length and width are given and the appropriate button is pressed. Make sure to make all buttons functional. Rename to exam4sample21.html Input File: Output File: rectangle.html exam4sample21.html 2. Add input validation such that the proper error is generated when the input field is not a number. Rename to exam4sample22.html Use input form validation as follows: onclick="if(isInteger(ʻinputl')) compute('inputl');" function isInteger(id) var flag=true; var x=document.getElementById(id); if (x.value==nuii || x.value=="") else if (x.value==") else if (isNaN (x.value)) else if ((parseFloat (x.value))$1 !=® ) { alert("Value Is Not An Integer");flag=false;} return flag: { alert("Integer Field Empty");flag=false;} i alert("Value Not A Number"); flag=false;} Input File: Output File: exam4sample21.html exam4sample22.html 3. Add onfocus functionality to the input field stating "Enter Number Here". Rename to exam4sample23.html.´ (20pts) Input File: Output File: exam4sample2.html exam4sample3.html 4. Convert the Javascript code from #3 to be in 00P format instead. Rename to exam4sample24.html. Input File: Output File: exam4sample23.html exam4sample24.html 5. Modify the application from #4 to use DOM standard event addEventListener. Rename to exam4sample25.html. Input File: Output File: exam4sample24.html exam4sample5.html 6. Change the application from #5 to dynamically display the form using DOM innerHTML. Rename to exam4sample26.html. (20pts) Input File: Output File: exam4sample25.html exam4sample26.html
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY