Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Application Development Lab JS GUI Due: 11:59 pm Tuesday, April 18, 2017. Submit

ID: 3818537 • Letter: A

Question

Application Development Lab JS GUI Due: 11:59 pm Tuesday, April 18, 2017. Submit through Canvas. Instructions No late submission will be accepted. Your web page MUST and run without emor. Use JS GUI+ Your Last Name First Letter of Your First Name as your file name. Note that no space or special character other than underscore should be used in the name. For instance, for me, the name of my file should be JS GUIDingw.html. Violation of naming requirement will result in 3 points cut. In the HTML comment tags, at the very beginning of the HTML, you should put your full name, the course number and name (COP 3834-01 Web Application Development, the name of lab, e g. JS GUL, and the date. Without this, 5 point will be cut. Subject Follow the sam code below, ple

Explanation / Answer

//HTML and JS script for given problem statement which calculate max ,min and average of given three numbers.

<html>
<body>
<input type="text" id="n1"><br>
<input type="text" id="n2"><br>
<input type="text" id="n3"><br>
<input type="text" id="max">
<input type="text" id="min">
<input type="text" id="avg"><br>
<p></p>
<button>Calculate</button><br>

<script type="text/javascript">
function calculate()
{
   var x1=document.getElementById("n1");
   var x2=document.getElementById("n2");
   var x3=document.getElementById("n3");
   var max=document.getElementById("max");
   var min=document.getElementById("min");
   var avg=document.getElementById("avg");

   var max_ans=x1;
   var min_ans=x2;
  
   if (max_ans.value<x2.value)
       max_ans=x2;
   if(max_ans.value<x3.value)
       max_ans=x3;

   if (min_ans.value>x2.value)
       min_ans=x2;
   if(min_ans.value>x3.value)
       min_ans=x3;

   max.value=parseInt(max_ans.value);
   min.value=parseInt(min_ans.value);
   avg.value=parseInt((parseInt(x1.value)+parseInt(x2.value)+parseInt(x3.value))/3);
}
</script>
</body>

</html>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote