Hai frnds,请帮我看看visual studio 2010的鼠标点击和鼠标离开事件 [英] Hai frnds, pls help me for the mouse click and mouse leave event for visual studio 2010

查看:103
本文介绍了Hai frnds,请帮我看看visual studio 2010的鼠标点击和鼠标离开事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在以网站形式开展一个程序,而不是在Windows窗体应用程序中..是否可以在Visual Studio 2010中使用鼠标事件...请帮助我....

我的意思是,

鼠标点击

鼠标输入

鼠标离开

全鼠标evetnts ....请帮助我< br $> b $ b

我尝试过的事情:



我是以网站形式做一个程序,不是在Windows窗体应用程序..是可能的鼠标事件是在Visual Studio 2010中..请帮助我....

我的意思是,

鼠标点击

鼠标输入

鼠标离开

全鼠标evetnts ....请帮助我

解决方案

否 - 不在C#中。对于网站,您需要在客户端处理这些事件,而不是服务器,并且C#始终在服务器上执行。对于鼠标事件,您希望在Javascript中处理它们: Javascript - 鼠标事件 [ ^ ]应该有所帮助。


没有任何关系在鼠标事件和视觉工作室2010之间

它纯粹是一个HTML元素的javascript事件,它将在浏览器中运行,你不需要有视觉工作室,只需写一些HTML记事本中的代码,将其保存为.html扩展名并在任何浏览器中打开,您的事件和HTML相关内容将完美无缺。



引用:

是可能的鼠标事件是在visual studio 2010中



你必须手动编写,可能是intellisense帮助你一点。



有关鼠标事件的更多信息,请参阅:

HTML onmousedown事件属性 [ ^ ]

HTML onmousemove事件属性 [ ^ ]

HTML onmouseout事件属性 [ ^ ]

HTML onmouseover事件属性 [ ^ ]

HTML onmouseup事件属性 [ ^ ]

鼠标事件| jQuery API文档 [ ^ ]



所有这些在jquery中的鼠标事件

button1.Attributes.Add(onmouseover,SomeJavaScriptFunction();) ;



和SomeJavaScriptFunction()你可以调用ajax


Am doing a program in website form, not in windows forms application.. is that possible for mouse events is there in visual studio 2010.. kindly pls help me....
I mean,
mouse click
mouse enter
mouse leave
whole mouse evetnts.... pls help me

What I have tried:

Am doing a program in website form, not in windows forms application.. is that possible for mouse events is there in visual studio 2010.. kindly pls help me....
I mean,
mouse click
mouse enter
mouse leave
whole mouse evetnts.... pls help me

解决方案

No - not in C#. For a website, you need to handle those event at the client, not the server, and C# is always executed on the server. For mouse events, you want to handle them in Javascript: Javascript - Mouse Events[^] should help.


There is no relation between "mouse events" and "visual studio 2010"
its purely a javascript events for an HTML element which will run in browser, you dont need to have visual studio for that, just write some piece of html codes in a notepad, save it as .html extension and open it in any browser, your events and HTML related stuffs will work perfect.

Quote:

is that possible for mouse events is there in visual studio 2010


you will have to write it manually, might be intellisense help you a little.

for more information on mouse events refer :
HTML onmousedown Event Attribute[^]
HTML onmousemove Event Attribute[^]
HTML onmouseout Event Attribute[^]
HTML onmouseover Event Attribute[^]
HTML onmouseup Event Attribute[^]


Mouse Events | jQuery API Documentation[^]

All this a mouse events which are in jquery
button1.Attributes.Add("onmouseover","SomeJavaScriptFunction();");

and on SomeJavaScriptFunction() you can call ajax


这篇关于Hai frnds,请帮我看看visual studio 2010的鼠标点击和鼠标离开事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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