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>