SOURCE

console 命令行工具 X clear

                    
>
console
for (let i = 1; i <= 9; i++) {
    var str = " ";
    for (let j = 1; j <= i; j++) {
        str += j +" * " + i +  ' = ' + i * j + "\xa0\xa0";
        if (i * j < 10) {
            str += "\xa0\xa0";
        }
    }
    console.log(str);
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>乘法表</title>
    <script type="text/javascript"></script>
</head>
<body>
    <p>乘法表</p>
</body>
</html>