jQuery event.type 属性
示例
返回触发了哪个事件类型
$("p").on("click dblclick mouseover mouseout", function(event){
$("div").html("事件: " + event.type);
});
自己动手试一试 »
定义和用法
event.type 属性返回触发了哪个事件类型。
语法
event.type
| 参数 | 描述 |
|---|---|
| 事件 | 必需。 event 参数来自事件绑定函数。 |
返回触发了哪个事件类型
$("p").on("click dblclick mouseover mouseout", function(event){
$("div").html("事件: " + event.type);
});
自己动手试一试 »
event.type 属性返回触发了哪个事件类型。
event.type
| 参数 | 描述 |
|---|---|
| 事件 | 必需。 event 参数来自事件绑定函数。 |
如果您想将 W3Schools 服务用于教育机构、团队或企业,请发送电子邮件给我们
sales@w3schools.com
如果您想报告错误,或想提出建议,请发送电子邮件给我们
help@w3schools.com