我想在 JavaScript 中逐行读取本地文件。Ut 我可以检查它是否到了这个文件的末尾。例如:
file = new ActiveXObject("Scripting.FileSystemObject");
// Sets the variable "f" to equal the new open file contents
f = file.OpenTextFile("c:\\wantlist.txt", 1);
s = f.ReadLine()
While(s != EOF)
{
//. Do some thing
s = f.ReadLine()
}
JavaScript 中的 EOF 应该是什么?或者你有其他方法来处理这个问题吗?非常感谢你!