Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
MSXML2.XMLHTTP 怎么POST数据。
CreateObject("MSXML2.XMLHTTP")
放到全局代码Public Function 中出错, XMLHTTP 的POST方法怎么用?
http = CreateObject("MSXML2.XMLHTTP")
http.Open("post", url, False)
http.send(“这里加POST的数据无效”)
求解。
http url这些变量应该定义吧?
这个类型我没有研究过。
Public Function xmlhttp(ByVal uu As String , ByVal dd As String) As String
Dim http As Object
Dim html As String
http = CreateObject("MSXML2.XMLHTTP")
http.Open("post", uu, False)
http.send(dd)
html = http.responseText
Return html
End Function
这样写对吗?
这段代码的语法没有问题。
---------------------------
错误
---------------------------
错误代码位置:窗口,窗口1,Button1,Click
System.ArgumentException: 参数不正确。
在 Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
在 UserCode.xmlhttp(String uu, String dd)
在 UserCode.Click_24acabe3(ControlEventArgs e)
---------------------------
确定
---------------------------
这不是语法问题的,这是你传递给xmlhttp的open方法的参数有问题