Function urlChk(sUrl)
on error resume next
Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
xmlHttp.open "GET",sUrl,false
xmlHttp.send
    if xmlHttp.Status <> 200 then
        urlChk=false
    else
        urlChk=true
    end if
End Function

sUrl="https://www.jb51.net"
if urlChk(sUrl) then
    response.write(sUrl&"(可以正常访问)")
else
    response.write(sUrl&"(访问不了)")
end if
标签:
asp,检测链接

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
白云城资源网 Copyright www.dyhadc.com

评论“asp下的一个检测链接是否正常的函数”

暂无“asp下的一个检测链接是否正常的函数”评论...