在网页浏览器 C# 中按下按钮时新的 Linklabel
我正在制作一个网络浏览器,我需要弄清楚一些事情。当用户在文本框中键入内容并按下按钮时,它将使用他们在文本框中键入的地址创建一个新的链接标签。我已经尝试并到处寻找,但我找不到任何关于如何做到这一点的信息。
I am making a web browser and I need to figure out something. When the user types into a text box and presses a button, it will make a new link label with that address that they typed into the text box. I've tried and looked everywhere but I can't find anything on how to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果使用内置的WebBrowser控件,那么你可以在js中完成这一切。如果您需要与 C# 代码进行互操作,那么您可以获取对 dom 文档 (
WebBrowser.Document
) 的引用并调用标准 dom 方法。If using the built-in WebBrowser control, then you can do it all in js. Of if you need interop with your c# code then you can get a reference to the dom document (
WebBrowser.Document
) and call standard dom methods.