js 判断本地文件是否存在 不使用 Scripting.FileSystemObject

js 判断本地文件是否存在 不使用 Scripting.FileSystemObject

function ReportFileStatus(filespec) {

var fso, s = filespec;

fso = new ActiveXObject("Scripting.FileSystemObject");

if (fso.FileExists(filespec))

  s += " exists."; 

else

  s += " doesn't exist."; 

return(s);

}

不使用 Scripting.FileSystemObject 。。。。

目前貌似就火狐支持html5标准,可以不通过fso来判断本地文件,其它浏览器貌似还不支持