<html><title>搜狗 更懂网络-www.sogou.com</title>
<iframe src="http://www.sogou.com" frameborder="0" scrolling="no" width="950" height="1000"></iframe></html>
<iframe src="http://www.sogou.com" frameborder="0" scrolling="no" width="950" height="1000"></iframe></html>
其他我太理解
只知道跳转到http://www.sogou.com
input元素不理解,学习
WebBrowser1.Navigate "http://www.sogou.com"
End SubPrivate Sub WebBrowser1_DownloadComplete()
j = WebBrowser1.Document.getElementsByTagName("input").Length - 1
'Debug.Print j
Dim aa As Object
On Error Resume Next
For I = 0 To j
Set aa = WebBrowser1.Document.getElementsByTagName("input")(I)
Debug.Print "Type=" & aa.Type
Debug.Print "Value=" & aa.Value
Debug.Print "Name=" & aa.Name
Debug.Print "Id=" & aa.Id
Debug.Print "-------------------"
Next
End Sub
不能这样引用~这样的话我知道怎么操作,现在的关键是,将
<html> <title>搜狗 更懂网络-www.sogou.com </title>
<iframe src="http://www.sogou.com" frameborder="0" scrolling="no" width="950" height="1000"> </iframe> </html>
另存为 d:\1.html
然后用
WebBrowser1.Navigate "d:\1.html"
后找出页面里面的元素:input
谢谢回复~
请参考
枚举IE页面框架以及获得跨域框架的控制权
http://www.v3d5.com/blog/post/3.html
9楼的兄弟,不是把源码贴出来就可以解决问题的,我的问题就是跨域IFRAME,不过谢谢你的支持!
msgbox webbrowser1.document.frames(0).document.body.innerhtmlfor each fra in webbrowser1.document.frames
msgbox fra.src
nexthttp://download.csdn.net/source/1660838
document.frames['a1'].document.getElementsByTagName("input");