Al juzgar el archivo del cliente, puede usar
Copiar código del código de la siguiente manera:
var fSO, s = fileSpec;
fso = new ActiveXObject ("scripting.filesystemObject");
if.fileExists (filespec))
s+= "existe.";
demás
s+= "no existe" ;;
alerta (s);
Al juzgar el lado del servidor (archivo de red), puede usar
Copiar código del código de la siguiente manera:
var xmlhttp = new ActiveXObject ("Microsoft.xmlhttp");
xmlhttp.open ("get", tu, falso);
xmlhttp.send ();
if (xmlhttp.readyState == 4) {{
if (xmlhttp.status == 200) s+= "existe";
else if (xmlhttp.status == 404) s+= "no existe";
else S+= "";
}
alerta (s);
Puede <input type = "file" name = "id =" "Contenteditable =" false "> Establecer Contentedable a False para limitar a los usuarios a elegir solo archivos, no entrada.