新人求指导
javascript吧
全部回复
仅看楼主
level 2
老师布置作业,自学FOR LOOP,但我还是没有搞懂,老师布置的作业是这样的
然后最后不管你输进去什么数字,都成这样子
求助啊,急
2016年10月01日 10点10分 1
level 2
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Lab 14c</title>
</head>
<body>
<script>
var index = prompt("Please enter a number","");
// Create the HTML list
document.write("<ol>");
for(var index=1;index<=10;index=index+1)
{
// add the next list item
document.write("<li>List item " + index + "</li>");
}
document.write("</ol>");
</script>
</body>
</html>
这是我写的,不管输进什么数字但每次都都这样子
2016年10月01日 10点10分 2
level 2
自顶
2016年10月01日 10点10分 3
level 2
没有大神么
2016年10月01日 10点10分 5
level 2
自顶
2016年10月01日 11点10分 7
1