var fso = new ActiveXObject("Scripting.FileSystemObject");
if (fso.FileExists("cistern.in")){
var s = fso.OpentextFile("myfile.txt");
while (!s.AtEndOfStream)
alert(s.ReadLine())
s.Close();}else{
alert("Input file not found!")
}
if (fso.FileExists("cistern.in")){
var s = fso.OpentextFile("myfile.txt");
while (!s.AtEndOfStream)
alert(s.ReadLine())
s.Close();}else{
alert("Input file not found!")
}
s.ReadAll 全部
s.Read(num)读出多少个