VBAmacrosexcel ..错误不能从页面获取信息

无法获取数据

Sub differntIEsize() Dim ie As New SHDocVw.InternetExplorer Dim doc As HTMLDocument Set ie = CreateObject("InternetExplorer.Application") With ie .Visible = True .navigate "https://en.wikipedia.org/wiki/Main_Page" Do While .Busy DoEvents Loop Do While .readyState <> 4 DoEvents Loop Set searchtxt = .document.getElementById("searchInput") searchtxt.Value = "Earth" .document.forms(0).submit Do While .Busy DoEvents Loop Do While .readyState <> 4 DoEvents Loop 'IE.navigate "javascript:document.getElementById('.document.forms(0).submit').click();" ThisWorkbook.Sheets(1).Range("A2") = "hgvgjjlj" Set doc = .document ThisWorkbook.Sheets(1).Range("A1").Value = doc.getElementById("toctitle").innerText .Quit End With End Sub