Comparta el método de JavaScript para determinar si existe un archivo.
1. Al juzgar los archivos del cliente, puede usarlo
var fso, s = fileSpec; // filespec = "c: /path/myfile.txt" fso = new ActiveXObject ("scripting.filesystemObject"); if (fso.fileExists (fileSpec)) s+= "existe."; else // www.vevb.coms+= "no existe"; alerta (s);;2. Al juzgar el lado del servidor (archivo de red), puede usarlo
var xmlhttp = new ActiveXObject ("Microsoft.xmlhttp"); xmlhttp.open ("get", yourFileUrl, false); xmlhttp.send (); if (xmlhttp.readystate == 4) {if (xmlhttp.status == 200) s+= "Ej. // La url existe más si (xmlhttp.status == 404) s+= "no existe."; // URL no existe más s+= ""; // otro estado} // www.yuju100.comalert (s);Puede establecer Contentedable en falso para establecer Contentedable a False para limitar a los usuarios a seleccionar archivos, y no puede ingresarlos a voluntad.