我爱编程

99乘法表

2018-06-21  本文已影响3人  郭的妻
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        span {
            width: 100px;
            line-height: 50px;
            text-align: center;
            display: inline-block;
            border: 1px solid black;
            background: paleturquoise;
        }
    </style>
</head>
<body>
<script>
    for (let i = 1; i <= 9; i++) {
        document.write("<br>")
        for (let j = 1; j <= i; j++) {
            document.write("<span>" + j + "*" + i + "=" + (j * i) + "</span>")
        }
    }

</script>

</body>
</html>
上一篇下一篇

猜你喜欢

热点阅读