Javascript "文件"and "new File"构造函数

Javascript difference between "File" and "new File" constructors?

本文关键字:quot File 构造函数 new 文件 Javascript and      更新时间:2023-09-26

JS的"File"answers"new File"构造函数对于新文件的区别是什么?

var f = File("C:/myfile.txt");

var f = new File("C:/myfile.txt");

提前感谢!

ECMAScript-262中没有File对象

也许你指的是ExtendedScript (Adobe CS)的File对象?

File ([path]); //can return a Folder object
new File ([path]); //always returns a File object

来源:JavaScriptToolsGuide_CS5