<!doctype html> <html> <head> <meta charset="utf-8"> <title>99乘法表</title> </head> <script> function out(n=9){ for(var i=1; i<=n; i++){ document.write("<h3>"); for(var j=1; j<=i; j++){ document.write("<span>"+j+"x"+i+"="+(j*i)+"</sapn> ") } document.write("</h3>"); } document.write("<hr>") } out(10); </script> <body> </body> </html>