Thuộc tính jQuery event.type

❮ Phương thức sự kiện jQuery

Thí dụ

Trả lại loại sự kiện đã được kích hoạt:

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

Định nghĩa và Cách sử dụng

Thuộc tính event.type trả về loại sự kiện nào đã được kích hoạt.


Cú pháp

event.type

Parameter Description
event Required. The event parameter comes from the event binding function

❮ Phương thức sự kiện jQuery