用 webBrowser1 怎取得 iframe 中的流容?
用 webBrowser1 怎取得 iframe 中的流容?
置 webBrowser1.URL= "www.xxx.com/abc.html "
abc.html的容有iframe
<html>
<BODY bgColor= "white " leftMargin= "0 " topMargin= "0 " rightMargin= "0 " marginheight= "0 ">
<center> <iframe id= "chatContents " src= "contents.php " frameborder= "0 " width= "100% " height= "30% " scrolling= "no " marginwidth= "0 " marginheight= "0 "> </iframe> </center>
<iframe id= "reloadpage " name= "reloadpage " src= "reloadpage2.php?subpage=0 " frameborder= "0 " scrolling= "auto " style= "width: 0px; height: 0px; border: 0px; "> </iframe>
</body>
</html>
我取出的 webBrowser1.DocumentStream 就不是 前示的容,而是abc.html 的容,如上
我怎才能取到前示的容?在置webBrowser1.URL= "www.xxx.com/abc.html "的情下,怎才能取得真正的容,即 iframe 中的 reloadpage2.php 的示容?
[解决办法]
HtmlDocument李找到iframe的地址,然后读取
[解决办法]
可以首先用HttpWebRequest和HttpWebResponse获取iframe的URL,然后在用WebBrowser打开.