回覆列表
  • 1 # Dufrense987

    <!doctype html>

    <html>

    <head>

    <meta charset="UTF-8">

    <title>九九乘法表</title>

    </head>

    <body>

    <script>

    var tab = document.createElement("TABLE");

    tab.style.border = "1px solid black";

    tab.style.borderCollapse="collapse";

    for(var i = 1; i <=9 ; i++){

    var tr = document.createElement("TR");

    tab.appendChild(tr);

    for(var j = 1,str=""; j<=i ; j++){

    str=j+"x"+i+"="+i*j+" ";

    var td = document.createElement("TD");

    td.style.border = "1px solid black";

    td.style.height = "20px";

    td.innerHTML=str;

    tr.appendChild(td);

    }

    }

    document.body.appendChild(tab);

    </script>

    </body>

    </html>

  • 中秋節和大豐收的關聯?
  • 蔡恩威廉森首秀砍22分7板3助攻,如何評價他的表現?