返回列表 发帖

[问题求助] VBS脚本internetexplorer.application怎么获取document?

set ie = CreateObject("internetexplorer.application")
ie.navigate "https://xxxx.xxxx/xxxx"
Set d=ie.Document'报错,未指定的错误COPY

win10 22h2
IE被edge强行替代
等待的时间有点长,但是2楼的脚本还是可以正常运行

你要不是研究internetexplorer.application对象
建议用CreateObject("Msxml2.XMLHTTP")对象下载网页

QQ 20147578

TOP

回复 3# jyswjjgdwtdtj


   我在自己的电脑上测试没问题啊

win7x64sp1

哦,你是win10,我再试一下

QQ 20147578

TOP

回复 2# czjt1234


    错误:远程服务器不存在或不可用
不管是busy还是readystate

TOP

Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate "https://www.baidu.com/"
'oIE.Visible = False
Do
    WScript.Sleep 200
Loop While oIE.Busy Or oIE.ReadyState <> 4
Set d = oIE.Document
MsgBox TypeName(d)COPY

QQ 20147578

TOP

返回列表