Latest web development tutorials

jQuery event.type property

jQuery Event Methods jQuery Event Methods

Examples

Returns the type of event which is triggered:

$("p").on("click dblclick mouseover mouseout",function(event){
$("div").html("Event: " + event.type);
});

try it"

Definition and Usage

event.type property returns what type of event is triggered.


grammar

event.type

参数 描述
event 必需。 event 参数来自事件绑定函数。


jQuery Event Methods jQuery Event Methods