正序
<script type="text/javascript">
document.write('<table border="1" bgcolor="pink" width="500px">');
for (var i = 1; i <= 9; i++) {
document.write('<tr>')
for (var j = 1; j <= i; j++) {
document.write('<td>' + j + '*' + i + '=' + (i * j) + '</td>')
}
document.write('</tr>')
}
document.write('</table>');
</script>
效果图
倒序
<script type="text/javascript">
document.write('<table border="1" bgcolor="blue&