<script language="javascript"> function getURL(url) { var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("GET",url,false); xmlhttp.send(); if (xmlhttp.readyState==4) alert((xmlhttp.Status==200)?"存在":"不存在"); } //user like this: getURL("http://localhost/1.asp") </script>
function getURL(url)
{
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET",url,false);
xmlhttp.send();
if (xmlhttp.readyState==4)
alert((xmlhttp.Status==200)?"存在":"不存在");
}
//user like this:
getURL("http://localhost/1.asp")
</script>