js写一个简单的九九乘法表

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        for (var r = 1; r < 10; r++) {

            for (var c = 1; c <= r; c++) {

                document.write(c + ‘x‘ + r + ‘=‘ + c * r + ‘&nbsp;&nbsp;‘);

            }

            document.write(‘<br/>‘);

        }
    </script>
</body>

</html>

 

js写一个简单的九九乘法表

上一篇:Nginx+uwsgi+ssl配置https


下一篇:HTML和CSS(二)