<script type="text/javascript">
function CheckPage(url)
{
var h = new ActiveXObject("Microsoft.XMLHTTP");
h.open("GET",url,false);
h.send();
return h.status==404;
}
if(CheckPage("http://www.heroworld.net/heroes3site/kao.htm")) //测试的页面
alert("不存在");
else
alert("存在");
</script>
function CheckPage(url)
{
var h = new ActiveXObject("Microsoft.XMLHTTP");
h.open("GET",url,false);
h.send();
return h.status==404;
}
if(CheckPage("http://www.heroworld.net/heroes3site/kao.htm")) //测试的页面
alert("不存在");
else
alert("存在");
</script>
我不想用指定的网址。大虾没有理解我的意思。
--- A.htm
|__/WWW/B.htm在A.htm中检查WWW目录下是否有B.htm这个文件。
=========
那是客户端的事情
=========
那是客户端的事情不明白,A,B文件都是在服务器上的啊。
=========
那是服务端的事情刚才写错了
不明白为什么不用服务端程序
客户端做什么都不保险