使用Visual Basic或C#删除或替换页面上的HTML元素 [英] delete or replace HTML Element on page using Visual basic or C#

查看:107
本文介绍了使用Visual Basic或C#删除或替换页面上的HTML元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法相信没有办法从我的应用程序是Web浏览器加载它的页面中删除一些元素吗?



例如,我添加到我的申请,



1 - 按钮



1 - webbrowser



加载时的应用程序导航到example.com/example.html



,该页面包含:

i can't believe there's no way to delete some element from page that my application is web browser load it it?

for example, i add on my application,

1 - button

1 - webbrowser

application on load navigate to example.com/example.html

and that page contains :

<div id="hello"></div>



现在加载页面时,当我点击按钮时,它只删除该节点。有什么办法吗?



(请不要告诉我使用该元素id删除它。我想在不使用id的情况下这样做。我相信有办法这样做)



谢谢。


now when page loaded, when i click on button, it deletes that node only. is there any way?

(please don't tell me to delete that using that element id. i want to do that without using id. i believe there's a way to do that)

Thanks.

推荐答案

这篇关于使用Visual Basic或C#删除或替换页面上的HTML元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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