使用代码获取URL表单父URL页面包含超链接的特定文本 [英] Get URL form parent url page particular text containing hyperlink using code

查看:72
本文介绍了使用代码获取URL表单父URL页面包含超链接的特定文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

详细信息:我有一个网址。假设在这个URL页面中有超链接See。



我想要URLSee将重定向。



我尝试过:



我试过



WebBrowser webBrowser1 = new WebBrowser();

webBrowser1.Navigate(new Uri(http://www.microsoft.com));

webBrowser1.Document.All .GetElementsByName(See);



但是webBrowser没有加载。

解决方案

WebBrowser.Navigate [ ^ ]方法立即返回。它不会等待页面加载。



DocumentCompleted [ ^ ]事件已被触发。

Detail: I have a URL . Suppose in this URL page there is hyperlink "See".

I want URL where "See" will redirect.

What I have tried:

I tried

WebBrowser webBrowser1 = new WebBrowser();
webBrowser1.Navigate(new Uri("http://www.microsoft.com"));
webBrowser1.Document.All.GetElementsByName("See");

But webBrowser is not loading.

解决方案

The WebBrowser.Navigate[^] method returns immediately. It does not wait for the page to load.

You won't be able to access any elements in the page until the DocumentCompleted[^] event has fired.


这篇关于使用代码获取URL表单父URL页面包含超链接的特定文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆