|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
老师,请问下面的代码问题出在哪里呢?数据查询成功,但是没有返回结果。
- Sub Main()
- Dim strText As String
- 'With CreateObject("MSXML2.XMLHTTP") 'CreateObject("WinHttp.WinHttpRequest.5.1")
- With CreateObject("WinHttp.WinHttpRequest.5.1")
- .Option(6) = False ' 禁止重定向,以获取原网页信息
- .Open "POST", "https://397489.yichafen.com/public/checkcondition/sqcode/NsDcIn5mNDkwM3w4NWYzNmU4YmFlYjc4YjZhNjk2NjMyODJhZjFhNmYxYXwzOTc0ODkO0O0O/htmlType/default.html", False
- .setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"
- .setRequestHeader "Referer", "https://397489.yichafen.com/public/queryscore/sqcode/NsDcIn5mNDkwM3w4NWYzNmU4YmFlYjc4YjZhNjk2NjMyODJhZjFhNmYxYXwzOTc0ODkO0O0O.html"
- .Send "s_kaohao=612017584&s_xingming=%E6%9B%BE%E7%A6%B9%E7%9A%93"
- strText = .responsetext
- Debug.Print strText
- End With
- End Sub
复制代码
|
|