我如何点击webbrowser c#中的href [英] how I can click on an href in webbrowser c#

查看:81
本文介绍了我如何点击webbrowser c#中的href的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

thnx用于阅读



此代码来自html页面



hi all
thnx for readding

this code from html page

<a class="setPoint " href="#"></a>





我如何点击这个



how I can click on this

推荐答案

你不可能点击href,因为这不是页面上显示的元素。但是,如果它在页面上呈现,则可以单击锚元素的任何内部HTML。要点击它,您可以使用鼠标,触摸板,绘图板,触摸屏或任何其他指点设备,实际上是键盘,使用Tab键导航然后按空格键。



只有这可以被视为点击。你不能使用任何软件技巧来实际点击任何东西,而且,如果你对它有所了解,你会明白你永远不需要它。如果你想获得与点击相同的效果,那就完全这样做(调用相同的JavaScript处理函数,重定向或任何你想要的)。



-SA
You cannot possibly click on "href", because this is not an element shown on a page. But you can click on any inner HTML of the anchor element, if it is rendered on the page. To click on it, you can use a mouse, touch pad, drawing pad, touch screen or any other pointing device, and, in fact, a keyboard, by navigating using Tab and then pressing a spacebar key.

Only that can be considered as a click. You cannot use any software software tricks to actually click on anything, and, if you thing about it, you will understand that you never need it. If you want to get the same effect as the click, do exactly that (call the same JavaScript handler function, redirection, or whatever you want).

—SA


你能解释一下吗?如果页面上有锚标记,则无法从C#执行单击事件,因为C#是服务器端的全部。如果您需要在浏览器中进行,您需要查看Javascript或jQuery。但是,根据您的最终目标,可能存在服务器端(c#)解决方案。
Can you explain a little more? If you have an anchor tag on the page, you won't be able to execute a 'click' event from C# because the C# is all server side. If you need it to happen at the browser you'll want to look at Javascript or jQuery. But, depending on what you're end goal is there might be a server side (c#) solution.


这篇关于我如何点击webbrowser c#中的href的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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