VB使用WebBrowser读取网页中iframe的内容

标签: , , ,

Set iframe = WebBrowser1.Document.frames(i).Document
Debug.Print iframe.documentElement.innerHTML
iframe.getElementsByName("username")(0).Value = "demon"

其实和JavaScript没什么区别,都是HTML DOM操作。

赞赏

微信赞赏支付宝赞赏

随机文章:

  1. cURL 7.22.0 with zlib SSL and IPv6 support
  2. C#清除WebBrowser的Cookie缓存
  3. Switch 无法启动软件。 请在HOME菜单中再试一次。
  4. 用VBS实现凯撒密码算法
  5. 88行代码实现俄罗斯方块游戏(含讲解)

5 条评论 发表在“VB使用WebBrowser读取网页中iframe的内容”上

  1. 雨中风铃说道:

    Set ie = WScript.CreateObject(“InternetExplorer.Application”)
    ie.Visible = True
    IE.Navigate “http://www.hercity.com/s/201105/12741.html”

    Do While ie.readystate4
    Wscript.Sleep 200
    Loop

    Set Frames = ie.Document.Frames
    For i=0 To Frames.Length-1
    msgbox Frames(i).Document.body.innerHTML
    Next

    ie.quit
    Set ie = Nothing

  2. 雨中风铃说道:

    VBS的拒绝访问

Demon 留下回复