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. OpenWrt中的Hotplug脚本
  2. JavaScript Unicode UTF-8
  3. VeryPDF PDF2Word v3.1 注册码
  4. VBSCript 之 GenerateSDDL 函数
  5. This document was successfully checked as XHTML 1.0 Strict!

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的拒绝访问

留下回复