获取点击的 HTML 链接的属性

发布于 2024-09-30 02:26:19 字数 140 浏览 0 评论 0原文

我开始使用 MS Visual C++ 2010 Express。我遇到了以下问题,我使用webBrowser控件查看html文档,需要获取单击链接的属性(可能只是一个),这可能吗?如果是的话该怎么做?

感谢您的所有回复,并对我的英语不好表示歉意;p

I'm starting to use MS Visual C++ 2010 express. I've had the following problem, I use a webBrowser control to view html documents and need to get the attributes (could it be just one) of clicked link, is it possible? and if it is then how to do this?

Thanks for all replies and sorry for my bad english ;p

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荒人说梦 2024-10-07 02:26:19

如果您使用 MSHTML (Trident) 中的 WebBrowserControl,则应该能够在接收到 DISPID_BEFORENAVIGATE2 时在函数 OnBeforeNavigate2() 或 DWebBrowserEvents2 的 Invoke() 中检索单击的 URL。

(URL 是第二个参数)。

以获得更多详细信息和解释。 MSDN

If you are using the WebBrowserControl from MSHTML (Trident), you should be able to retrieve the clicked URL in the function OnBeforeNavigate2() or in the Invoke() of your DWebBrowserEvents2 on reception of DISPID_BEFORENAVIGATE2.

(The URL is the second parameter).

To have more details and explanations. MSDN

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文