实现如下:
实现代码
<html>
<head>
<title>九九乘法表</title>
<style type="text/css">
</style>
</head>
<body>
<script type="text/javascript">
document.write("<table border='1' bordercolor='blue' cellspacing='5' cellpadding='10'>");
var ht=9;
//循环行
for (var i = 1; i <= ht; i++) {
document.write("<tr>");
//循环列
for (var j = 1; j <= i; j++) {
document.write("<td>");
//运算
document.write(j+"*"+i+"="+i*j);
document.write("</td>");
}
document.write("</tr>");
}
document.write("</table>");
</script>
</body>
</html>