以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  CreateObject("MSXML2.XMLHTTP")这里会报错,是怎么回事?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=191385)

--  作者:xluoping
--  发布时间:2024/4/13 19:51:00
--  CreateObject("MSXML2.XMLHTTP")这里会报错,是怎么回事?
dim arg as string = "甲苯"
Dim url As String = ""
Dim http As New Object
try
    url = "https://www.chemsrc.com/searchResult/" & UrlEncode(arg) & "/"
    http = CreateObject("MSXML2.XMLHTTP")
    http.Open("get", url, False)
    http.send()
    url = http.responseText  \'这里会报错,是怎么回事?
Return url 
Catch exi As Exception
    Return ""
End try

--  作者:有点蓝
--  发布时间:2024/4/14 20:17:00
--  
我测试没有报错