var fso = new ActiveXObject("Scripting.FileSystemObject"); var ts = fso.OpenTextFile("c:\\testfile.txt", 1); alert(ts.ReadAll());