|
学习多多姐的代码,写一个:- Sub main()
- Dim winHttp As Object, Dom As Object, Js As Object
- Dim code$, info_examNo$, info_stName$, ecStr$
- Set winHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
- Set Dom = CreateObject("htmlfile"): Set Js = Dom.parentWindow
- Dom.write "<script src='http://www.zsedu.net/rrt/js/my-controls/JEventInfo.js'></script>"
- info_examNo = "081900005" '学号
- info_stName = Js.eval("encodeURIComponent('陈浩')") '姓名
- code = "a5c6e45ea4dcabf63acb7836760a9ef1" '查询类型
- ecStr = Js.eval("getEventEncrypt({type:'click',pageX:'157',pageY:'824',target:{nodeName:'BUTTON'}})")
- With winHttp
- .Open "GET", "http://www.zsedu.net/rrt/common/initSearch", False
- .Send
- .Open "POST", "http://www.zsedu.net/rrt/query/search-info/search", False
- .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- .Send "code=" & code & "&info_examNo=" & info_examNo & "&info_stName=" & info_stName & "&_n=" & ecStr
- Debug.Print .responsetext
- End With
- End Sub
复制代码
|
|