제목 : 예제. 37.for문_구구단출력.htm
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<SCRIPT language="javascript">
document.write("<center><u><h3>구구단 출력</h3></u></center>");
document.write("<div align=center><table border=1>");
document.write("<tr bgcolor=silver>");
for(i = 2; i < 10; i++)
{
document.write("<td align=center>");
document.write(i + "단");
document.write("</td>");
}
document.write("</tr>");
document.write("<tr>");
for(i = 2; i < 10; i++)
{
document.write("<td align=right><nobr>");
for(j = 1; j < 10; j ++)
{
document.write(i + " * " + j + " = " + i * j +"<br>");
}
document.write("</nobr></td>");
}
document.write("</tr>");
document.write("</table></div>");
</SCRIPT>
</BODY>
</HTML>