鼠标单击事件 [英] mouse on click event

查看:99
本文介绍了鼠标单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是鼠标单击事件的代码

what is code for mouse on click event

推荐答案

有很多与鼠标单击事件有关的代码.您是否要创建一个在鼠标单击按钮时触发的JavaScript函数?还是您希望单击按钮时触发回发,以便单击该按钮时将执行服务器端代码?或者,也许您只想要一个处理程序,即可在整个网页的任何位置单击鼠标?您需要更加具体.你想达到什么目的?你试过什么了?您具体遇到什么问题?张贴一些您尝试过的代码,并解释您期望它做什么以及它正在做什么.
There''s lots of code related to mouse click events. Are you looking to create a JavaScript function that is fired when the mouse clicks a button? Or perhaps you want a postback to be fired when you click a button so that server side code will be executed when that button is clicked? Or maybe you just want a handler for any mouse click anywhere in the entire webpage? You need to be a little more specific. What are you trying to accomplish? What have you tried so far? What specifically are you having problems with? Post some code of what you''ve tried and explain what you expected it to do and what it is doing instead.


请您正确地提出问题.事件,无论是javascript还是codebehind(c#,vb.net).

代码在下面

用于代码隐藏
Please you should ask the question correctly. The event whether javascript or codebehind(c#,vb.net).

code is below

for codebehind
protected void btnSave_Click(object sender, EventArgs e)
{
  //code to be executed
}


对于javascript


for javascript

<a href="http://www.codeproject.com" onClick="window.open(''http://www.codeproject.com'');return false;">Code Project</a>



如果您有任何疑问,请告诉我



please let me know if you have any doubt


这篇关于鼠标单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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