2012-06-26 45 views
2

嗨谁能帮我绑定究竟如何理解传递例如一个事件,绑定属性 - 识别活动

$("#example_button").bind("click",function(){ 
    alert("Event is clicked"); 
}) 

$("#example_button").bind("mouseover",function(){ 
    alert("Event is mouseover"); 
}) 

究竟是如何结合的数字(标识)的情况下....我的意思是有什么办法可以识别事件......

回答

3

见jQuery的事件对象的type attribute

$("a").click(function(event) { 
    alert(event.type); // "click" 
}); 
+0

这里我们要说的$( “A”)点击() - >但我不知道。了解可点击或鼠标悬停的事件 – Coolenough