3个回答
展开全部
二楼的不对,要输出0-49啊
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
document.write('<table border=1>');
for(i=0;i<5;i++)
{
document.write('<tr>');
for(j=0;j<10;j++)
{
document.write('<td>'+(i*10+j)+'</td>');
}
document.write('</tr>');
}
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
document.write('<table border=1>');
for(i=0;i<5;i++)
{
document.write('<tr>');
for(j=0;j<10;j++)
{
document.write('<td>'+(i*10+j)+'</td>');
}
document.write('</tr>');
}
</script>
</body>
</html>
展开全部
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function createtable() {
var str = "<table border='1'>";
for (var i = 1; i <= 5; i++) {
str += "<tr>";
for (var j = 1; j <= 10; j++) {
str += "<td>" + ((i-1) * 10+j) + "</td>";
}
str += "</tr>";
}
str += "</table>";
var div = document.getElementById("d1");
div.innerHTML = str;
}
</script>
</head>
<body onload="createtable();">
<div id="d1"></div>
</body>
</html>
<head>
<title></title>
<script type="text/javascript">
function createtable() {
var str = "<table border='1'>";
for (var i = 1; i <= 5; i++) {
str += "<tr>";
for (var j = 1; j <= 10; j++) {
str += "<td>" + ((i-1) * 10+j) + "</td>";
}
str += "</tr>";
}
str += "</table>";
var div = document.getElementById("d1");
div.innerHTML = str;
}
</script>
</head>
<body onload="createtable();">
<div id="d1"></div>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这么简单你不会弄?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询