///js 代码:
〈SCRIPT LANGUAGE=“JavaScript“〉
function isExist(url) {
xmlhttp = new ActiveXObject(“Microsoft.XMLHTTP“)
xmlhttp.open(“GET“,url,false)
xmlhttp.send()
if(xmlhttp.status==200)
alert(url+“ 存在“)
else
alert(url+“ 不存在“)
}
〈/SCRIPT〉
〈input type=“button“ οnclick=“isExist(’http://www.sayee.com/cloudchen/js/myCalendar.htm’)“ value=“检测url是否存在“〉
///asp 代码:
Function getHTTPPage(url)
dim http
set http=Server.createobject(“Microsoft.XMLHTTP“)
Http.open “GET“,url,false
Http.send()
if Http.readystate 〈〉 4 then
exit function
else
getHTTPPage = http.status
end if
set http=nothing
if err.number〈〉0 then err.Clear
end function
〈SCRIPT LANGUAGE=“JavaScript“〉
function isExist(url) {
xmlhttp = new ActiveXObject(“Microsoft.XMLHTTP“)
xmlhttp.open(“GET“,url,false)
xmlhttp.send()
if(xmlhttp.status==200)
alert(url+“ 存在“)
else
alert(url+“ 不存在“)
}
〈/SCRIPT〉
〈input type=“button“ οnclick=“isExist(’http://www.sayee.com/cloudchen/js/myCalendar.htm’)“ value=“检测url是否存在“〉
///asp 代码:
Function getHTTPPage(url)
dim http
set http=Server.createobject(“Microsoft.XMLHTTP“)
Http.open “GET“,url,false
Http.send()
if Http.readystate 〈〉 4 then
exit function
else
getHTTPPage = http.status
end if
set http=nothing
if err.number〈〉0 then err.Clear
end function