ASP實(shí)例:是否支持XmlHttp組件的判斷

字號:

<%
    On Error Resume Next
    Response.Write "服務(wù)XMLHttp組件支持情況:
    "
    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)&"不支持
    "
    else
    Response.Write oxml(i)&" 支持
    "
    end if
    next
    %>