http://www.csdn.net/develop/article/20/20530.shtm

解决方案 »

  1.   

    var fs = new ActiveXObject("Scripting.FileSystemObject");    //定义对象
    var f = fso.OpenTextFile("testfile.txt", ForWriting, true);  //打开文件
    f.WriteLine("hello");                                        //写文件
    f.Close();
    r = f.ReadLine();                                            //读文件
    document.write(r);