调用HTML onclick函数 [英] Call HTML onclick functions

查看:100
本文介绍了调用HTML onclick函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我遇到了有关HTML onclick事件处理程序的一些问题.
我真的需要让此函数在Windows窗体内的WebBrowser控件中执行.

Hi!

I''m stuck with some problems regarding HTML onclick event handler.
I really need to get this function to be executed in a WebBrowser control inside my Windows form.

<a href="#" onclick="sendstickyto(); document.sendmail.submit(); return false;" class="action-button">SendMessage</a>


我在Chrome控制台中执行了此功能,效果很好,但是我需要在Windows窗体中执行相同的操作.
我猜有一种方法可以执行"onclick"事件吗? :)

感谢您的帮助!


Im executing this function in Chrome Console and it works perfectly, but i need to do the same in my windows form.
I guess there is a way to execute the "onclick" event ? :)

Thanks for any help !

推荐答案

您要执行的onclick函数是一个javascript函数.如果您要使用Wireshark分析用户单击按钮时页面的功能,您将能够找出正确的查询字符串来传递使正确的事情发生.顺便说一句,wireshark是一个免费工具,而google是您的朋友.
The onclick function you''re trying to executre is a javascript function. If you were to use Wireshark to analyze what the page does when the user clicks abutton, you will be able to figure out the correct querystring to pass to make the right things happen. BTW, wireshark is a free tool, and google is your friend.


您好
看看下面的链接.......

Control.Click事件
Hi
Check out below link.......

Control.Click Event


尝试一下:警报功能

try this : an alert function

<pre lang="HTML">
<a href="javascript:alert('here');" >an alert function</a>

</pre>


这篇关于调用HTML onclick函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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