九九乘法表JS版

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            span{
                display: inline-block;
                padding: 5px 10px;
                margin: 3px;
                background-color: hotpink;
                border: 1px solid black;
            }
        </style>
    </head>
    <body>
        <script type="text/javascript"> 
            for(let i=1;i<=9;i++){
                for(let t=1;t<=i;t++){
                    document.write(`<span>${t}x${i}=${t*i}</span>`)
                }
                document.write('<br>')
            }
        </script>
    </body>
</html>
posted @ 2023-03-19 18:20  不尽人意的K  阅读(17)  评论(0编辑  收藏  举报