Searching the internet is a great start...
Javascript code:
// Declare FSO
var fso = new ActiveXObject("Scripting.FileSystemObject");
// Open the file for reading.
f = fso.OpenTextFile("c:\\testfile.txt", 0x1 /* ForReading */);
// Read from the file and display the results.
while (!f.AtEndOfStream) {
Debug.Trace (f.ReadLine());
}
f.Close();