批改状态:未批改
老师批语:
<!doctype html>
<html>
<head>
<meta charset=UTF-8>
<meta name=Generator content=baidu.com>
<meta name=Author content=作者>
<meta name=Keywords content=关键词>
<meta name=Description content=文档描述信息>
<!--<link rel="stylesheet" type="text/css" href="css.css">
<link rel="icon" type="image/x-icon" href="img/标题logo">
<script type="text/javascript" src=""></script> -->
<style type="text/css">
*{margin:0;padding:0;}
address, cite, dfn, em, var{font-style:normal;}
li{font-style:normal;}
a{text-decoration:none;color:#f40;}
a:hover { text-decoration:underline;}
table{border-collapse:collapse; border-spacing:0;}
ul, ol { list-style:none; }
h1, h2, h3, h4, h5, h6{ font-size:100%; }
fieldset, img { border:0; }
tr,td{border:1px solid #d219192b;text-align:center;}
</style>
<title>js生成10行10列</title>
</head>
<body>
<script>
document.write('<table border=1 width="400px" height="400px">');
var num=1;
for (var a=1;a<=10;a++)
{
document.write('<tr>');
for (var b=1;b<=10;b++)
{
document.write('<td>'+num+'</td>');
num++;
}
document.write('</tr>');
}
document.write('</table>');
</script>
为什么最后边那个列。。。要比前面的宽呢。。。why、、、、
</body>
</html>点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号