ing.FileSystemObject“);
var f1 = fso.GetFile(“c:\\myjstest.txt“);
alert(“File last modified: “ + f1.DateLastModified);
执行上面最后一句后,将显示c:\myjstest.txt的最后修改日期属性值。
但有一点请注意:对于使用create方法建立的对象,就不必再使用get方法获取对象句柄了,这时直接使用create方法建立的句柄名称就可以:
var fso = new ActiveXObject(“Scripting.FileSystemObject“);
var f1 = fso.createtextfile(“c:\\myjstest.txt“,true“);
aler页码:[1] [2] [3] [4] [5] [6] 第4页、共6页 |