1
我使用webBrowser对象浏览到具有Iframe的页面。 我想通过使用GetElementByID函数获取此iframe中的特定对象。 我做这样的事情:webBrowser1.document.GetelementByID( “iframeName”)的document.getElementById(“的ElementName)C#webBrowser对象
它不工作,我得到空
任何想法
。? TY
我使用webBrowser对象浏览到具有Iframe的页面。 我想通过使用GetElementByID函数获取此iframe中的特定对象。 我做这样的事情:webBrowser1.document.GetelementByID( “iframeName”)的document.getElementById(“的ElementName)C#webBrowser对象
它不工作,我得到空
任何想法
。? TY
的Document
property得到HtmlDocument
对象拥有的元素,而不是在文档。
相反,你应该使用HtmlWindow.Frames
collection,像日是:
myWebBrowser.Document.Window.Frames["IFrameName"].Document.GetElementByID("ElementName")
HEYYYYYY !!!!完善!!!! 我一直在寻找这个解决方案。 非常感谢。 – 2010-08-10 13:05:30