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);
}
Using the client's FileSystemObject object
Example:
function check()
{
var fso;
fso = new ActiveXObject(" Scripting.FileSystemObject");
if( fso.FileExists("c:\testfile.txt"))
{
alert("Exists!");
}
else
{
alert("not Exists!");
}
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn