Html表格处理

Posted on 2019-10-08 16:12  风行天下-2080  阅读(125)  评论(0编辑  收藏  举报

1、

https://cloud.tencent.com/developer/article/1091944

2、

https://blog.csdn.net/qlwangcong518/article/details/84993471

3、

https://www.cnblogs.com/picaso/archive/2012/10/08/2715564.html

4、

表格前面增加序号

https://www.php.cn/js-tutorial-23565.html

5、使用javascript增加序号

<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打印表格</title>
 </head>
 <body>
    <script>
         var table="<table border='2' cellspacing='0'>";//这个字符串第一位为# 颜色的格式
            for(var i=0;i<10;i++) {
                table += "<tr>";
                for (var s=0;s<3;s++ ){
                    table = table+"<td>"+i+"</td>";
                }
                table+="</tr>";
            }
            table+="</table>";
        var bodys = document.getElementsByTagName('body')[0];
        bodys.innerHTML = table;
    </script>
</body>
 
</html>

Copyright © 2024 风行天下-2080
Powered by .NET 8.0 on Kubernetes