Page 317 - Web Applications (803) Class 11
P. 317
</HEAD>
<BODY>
<SCRIPT>
var a = parseInt(prompt(“Enter the first number”));
var b = parseInt(prompt(“Enter the second number”));
if(a > b)
{
document.write(“First number is greater then second number”);
}
else
{
document.write(“Second number is greater then first number”);
}
</SCRIPT>
</BODY>
</HTML>
Output:
When you click on the “OK” button, with the message “this page says”. Then a new window opens with “Enter the
Second number in it”.
Introduction to Dynamic Websites Using JavaScript 315

