在 silverlight 中操作网页元素

发布于 2024-12-25 17:42:31 字数 239 浏览 1 评论 0原文

我目前正在开发一个应用程序,需要对网站上的表单进行一些操作。当前的实现是在 WPF 中使用 WebBrowser 控件完成的。我可以成功填写字段并单击网站上的按钮。

我真的很想在 Silverlight 中实现相同的功能,但 Web 浏览器似乎严重瘫痪,我无法访问文档来填写任何内容。有什么方法可以做到这一点吗?

如果我可以有一个 iframe 并操作 Silverlight 应用程序中的内容,那就更好了,但我也不确定这是否可行。

I'm currently working on an application where I need to do some manipulation of forms on websites. The current implementation is done in WPF with a WebBrowser control. I can successfully fill in fields and click buttons on the sites.

I would really like to implement the same functionality in Silverlight but it seems like the WebBrowser is severely crippled and I cant access the Document to fill anything in. Is there any way to do this?

It would be even better if I could just have an iframe and manipulate the contents from a Silverlight application, but I'm not sure if this is possible either.

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

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

发布评论

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

评论(1

咽泪装欢 2025-01-01 17:42:31

您可以使用 HtmlPage类和HtmlElement 对象。

You can manipulate HTML DOM as well as invoke JS functions from Silverlight using the HtmlPage class and HtmlElement objects.

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