函数运行不了,求助
这段函数运行不了,不明白哪里出错了,请大家帮忙看一下,感谢。//loops.html文件
<html>
<head>
<title>
LOOPS Example
</title>
</head>
<body>
<h1>Loop Example</h1>
<p>Enter a series of names,I will then display them in a nifty numbered list.</p>
<script language="javascript" type="text/javascript" scr="loops.js"></script>
</body>
</html>
//loops.js文件
// JavaScript source code
names = new Array();
i = 0;
do {
next = window.prompt("Enter the Next Name", "");
if (next > " ")
names[i] = next;
i = i + 1;
} while (next > " ");
document.write("<h2>" + (names.length) + "names entered.</h2>");
document.write("<ol>");
for (i in names)
{
document.write("<li>" + names[i] + "<br>");
}
document.write("</ol>");