[COLOR=Red]My assignment is input 5 integer (have to show in xhtml) and deter main largest and smallest Integer. I am including the script:[/COLOR]
<?xml version =“1.0”?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<!-- Fig. 7.6: welcome5.html–>
<!— Using Promt Boxes -->
<html xmlns =“http://www.w3.org/1999/xhtml”>
<head>
<title> Using Promt and Alart Boxes</title>
<script type=“text/javascript”>
<!–
var x,y,z,o,p, result;
var xVal, yVal, zVal, oVal, pVal;
// read the name from the prompt box as a string
xVal = window.prompt(“please enter your first integer”, “0”);
yVal = window.prompt(“please enter your second integer”, “0”);
zVal = window.prompt(“please enter your first integer”, “0”);
oVal = window.prompt(“please enter your first integer”, “0”);
pVal = window.prompt(“please enter your first integer”, “0”);
x=parseInt (xVal);
document.writeln("<br/>First number is: " +x);
y=parseInt (yVal);
document.writeln("<br/>Second number is: " +y);
z=parseInt (zVal);
document.writeln("<br/>Third number is: " +z);
o=parseInt (oVal);
document.writeln("<br/>Fourth number is: " +o);
p=parseInt (pVal);
document.writeln("<br/>Fifth number is: " +p);
static int smallest(int x, int y, int z) {
if (x <= y && x <= z) {
return x;
}
else if (y <= x && y <= z) {
return y;
}
else
return z;
}
: I gave uppp
//–>
</script>
</head>
<body>
<p> click Refresh to run this script again.</p>
</body>
</html>