手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp下的一个检测链接是否正常的函数
asp下的一个检测链接是否正常的函数
摘要:FunctionurlChk(sUrl)onerrorresumenextSetxmlHttp=Server.CreateObject("M...

FunctionurlChk(sUrl)

onerrorresumenext

SetxmlHttp=Server.CreateObject("Microsoft.XMLHTTP")

xmlHttp.open"GET",sUrl,false

xmlHttp.send

ifxmlHttp.Status<>200then

urlChk=false

else

urlChk=true

endif

EndFunction

sUrl="http://www.jb51.net"

ifurlChk(sUrl)then

response.write(sUrl&"(可以正常访问)")

else

response.write(sUrl&"(访问不了)")

endif

【asp下的一个检测链接是否正常的函数】相关文章:

asp 简单数据库连接类

读取目录下的文件得到一个数组

用正则表达式写的HTML分离函数

个性验证码的制作方法

高手推荐的比较有用的ASP函数集合

一个实用asp分页函数

收集asp的常用函数

一个实用的FSO-实时统计在线人数

asp最常用的分页函数

asp中的Rnd 函数

精品推荐
分类导航