<!DOCTYPE html>

<html>

 <head>

<meta charset="utf-8" />

<title></title>

 </head>

 <body>

 </body>

<script type="text/javascript">

//首先设置行,列

var cols = 6; //6列

var rows = 6; //6行

var htmlstr = "<table border='1px'>";

for(i = 1; i <= rows; i++) {

htmlstr += "<tr>";

for(j = 1; j <= cols; j++) {

htmlstr += "<td >" + i + "行" + j + "列" + "</td>";

}

htmlstr += "</tr>";

}

htmlstr += "</table>";

document.write(htmlstr);

</script>

 </html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-11-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2021-09-03
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
相关资源
相似解决方案