回复 15# cjiabing - <html>
- <head>
- <title>创建文本文件</title>
- </head>
- <body>
- <hr>
- <script language="JavaScript">
- var fso,f1,pa;
- var pa= "d:\\Fastcopy\\st.txt"
- var ForReading=1;
- fso=new ActiveXObject("Scripting.FileSystemObject");
- f1=fso.CreateTextFile(pa,true);
- f1.WriteLine("Hello World!");
- f1.WriteLine("Hello World1!");
- f1.WriteBlankLines(1);
- f1.Close();
- document.write("创建文本文件: " + pa + "<br>");
- </script>
- </body>
- </html>
复制代码
|