HTML中用JavaScript语句输出九九乘法表,格式如下: 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9
时间: 2023-12-30 12:06:47 浏览: 73
JavaScript 实现九九乘法表
Sure, here's the JavaScript code for printing the multiplication table:
```javascript
for (let i = 1; i <= 9; i++) {
for (let j = 1; j <= i; j++) {
document.write(j + '*' + i + '=' + (i * j) + ' ');
}
document.write('<br>');
}
```
阅读全文