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...


RECTANGLE PROBLEM<br>Enter Length:<br>Enter Width:<br>Area:<br>Perimeter:<br>Area<br>Perimeter<br>|Both<br>Clear<br>1. Add JavaScript to the square problem such that it computes the area, perimeter<br>or both when the length and width are given and the appropriate button is pressed.<br>Make sure to make all buttons functional. Rename to exam4sample21.html<br>Input File:<br>Output File:<br>rectangle.html<br>exam4sample21.html<br>2. Add input validation such that the proper error is generated when the input<br>field is not a number. Rename to exam4sample22.html<br>Use input form validation as follows:<br>onclick=

Extracted 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
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here