var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("GET",yourFileURL,false); xmlhttp.send(); if(xmlhttp.readyState==4){ if(xmlhttp.status==200) s =" exists."; //url exists else if(xmlhttp.status==404)s =" doesn't exist."; //url does not exist else s ="";// Other statuses } alert(s);
canSet contentEditable to false to restrict users to only select files, not to type in.
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