<style>
table{
border-collapse:collapse;
}
table,th, td{
border: 1px solid black;
}
</style>
<body>
<script>
document.write("<table cellpadding=‘10‘ cellspacing=‘0‘>");
for(var j=1;j<=9;j++){
document.write("<tr>")
for(var i=1;i<=j;i++){
document.write("<td>"+j+"×"+i+"="+i*j+"</td>");
}
document.write("</tr>");
}
document.write("</table>");
</script>
</body>
- 折叠边框:border-collapse 属性设置是否将表格边框折叠为单一边框
原文地址:https://www.cnblogs.com/baiweisuye/p/9332840.html
时间: 2024-10-17 06:47:03