<html>
<head>
<title>square</title>
</head>
<body>
<script type="text/javascript" >
document.writeln("<h1>square from 1 to 10</h1>");
document.writeln("<table border=\"1\">");
document.writeln("<tr><th>number</th><th>square</th></tr>");
for(var i=1;i<=10;i++)
document.writeln("<tr><td>"+i+"</td><td>"+(i*i)+"</td></tr>");
document.writeln("</table>");
</script>
</body>
</html>
No comments:
Post a Comment