主要代码:
On Error Resume Next
Dim strTemp As String
Dim html As New HTMLDocument
Dim url As String
With CreateObject("Microsoft.XMLHTTP")
strTemp = Me.Text91
url = "http://dict.youdao.com/search?q=" & strTemp & "&keyfrom=dict.index"
' Debug.Print url
.Open "get", url, True
.send
While .ReadyState <> 4
DoEvents
Wend
html.body.innerHTML = .responseText
Me.Text94 = html.getElementsByClassName("baav")(0).innerText & vbCrLf
Me.Text94 = Me.Text94 & html.getElementsByClassName("trans-container")(0).innerText
End With
附件下载:
点击下载此附件
演 示: