zoukankan      html  css  js  c++  java
  • 前端学习笔记之99乘法表

     
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            #time {
                font-size: 200px;
                text-align: center;
                color: deeppink;
            }
            p {
                 100px;
                text-align: left;
                display: inline-block;
                padding: 10px;
                margin: 0px;
                font-size: 18px;
                background-color: lightcoral;
                border-top: 1px solid #cccccc;
                border-right: 1px solid #cccccc;
            }
            div {
                display: block;
            }
            #multiplication {
                /*  auto; */
                display: inline-block !important;
                display: inline;
                border-left: 1px solid #cccccc;
                border-bottom: 1px solid #cccccc;
            }
        </style>
    </head>
    <body>
        <h1>9*9乘法表</h1>
        <div id="multiplication"></div>
    </body>
    <script>
        window.onload = function () {
            for (let i = 1; i <= 9; i++) {
                document.getElementById("multiplication").innerHTML += "<div></div>";
                for (let j = 1; j <= i; j++) {
                    document.getElementById("multiplication").getElementsByTagName("div")[i - 1].innerHTML += "<p>" + j + "x" + i + "=" + (j * i) + "</p>"
                }
            }
        }
    </script>
    </html>
  • 相关阅读:
    免费的视频、音频转文本
    Errors are values
    Codebase Refactoring (with help from Go)
    Golang中的坑二
    Cleaner, more elegant, and wrong(msdn blog)
    Cleaner, more elegant, and wrong(翻译)
    Cleaner, more elegant, and harder to recognize(翻译)
    vue控制父子组件渲染顺序
    computed 和 watch 组合使用,监听数据全局数据状态
    webstorm破解方法
  • 原文地址:https://www.cnblogs.com/Yangyecool/p/13171669.html
Copyright © 2011-2022 走看看