<!doctype html>
<html>
<head>
<title>Display Square of 2 to 10 Numbers</TITLE>
</HEAD>
<body>
<h1> </h1>
<form name="f1">
<input type="submit" value="Display Square of 2 to 10 Numbers" onClick="display()">
</form>
</body>
<script language="Javascript">
function display()
{
var i;
document.writeln("Squares of Numbers from 2 to 10 are as follows:<br>");
for(i=2;i<=10;i++)
{
document.write("Square of "+i+"="+i*i+"<br>");
}
}
</script>
</html>