JavaScript判断文件是否存在

JavaScript判断文件是否存在
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);
}

 

posted on 2010-12-11 02:38  码魂  阅读(591)  评论(2编辑  收藏  举报

导航