网络编程
位置:首页>> 网络编程>> JavaScript>> asp检测服务器XmlHttp组件支持情况

asp检测服务器XmlHttp组件支持情况

 来源:asp之家 发布时间:2008-03-03 12:30:00 

标签:xmlhttp,ajax,服务器

随着ajax再网站建设中的的大范围流行,XmlHttp也自然被人们所熟悉。本文介绍了asp任何检测服务器端是否支持xmlhttp组件的方法,当然现在这个检测可能有点多余,因为服务器一般都支持。

<%
On Error Resume Next
Response.Write "<h3>服务XmlHttp组件支持情况:</h3>"
oxml=array("Msxml2.ServerXMLHTTP.6.0","Msxml2.ServerXMLHTTP.5.0","Msxml2.ServerXMLHTTP.4.0","Msxml2.ServerXMLHTTP.3.0","Msxml2.ServerXMLHTTP","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP")
for i=0 to ubound(oxml)
Set getxmlhttp = Server.CreateObject(oxml(i))
If Err Then
Err.Clear
Response.Write oxml(i)&"不支持<br/>"
else
Response.Write oxml(i)&" 支持<br/>"
end if
next
%>

推荐:ASP检测服务器相关的一些代码

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com