时间:2021-01-14 11:12:44 | 栏目:JavaScript代码 | 点击:次
废话不多说了,直接给大家贴代码了,具体代码如下所示:
<!DOCTYPE html> <html> <head> <title>99乘法表</title> <meta charset="utf-8"> </head> <body> <script type="text/javascript"> for (var i = 1; i <= 9; i++) { for (var j = 1; j <= i; j++) { document.write(i+'*'+j+'='); document.write(i*j+' '); } document.write("<br/>"); } </script> </body> </html>
效果图如下:
总结