-
Notifications
You must be signed in to change notification settings - Fork 13
模板 : element : 处理事件
eprom2006 edited this page Feb 9, 2020
·
1 revision
{
e:"a",
t:"click sample",
click:function(p){
alert("hi!");
}
}
传入参数结构
{
sender:{事件引发元素},
org_data:{原始数据},
new_data:{新数据}
}
{
e:"div",
t:"event sample",
event:{
click:function(p){
alert("click");
},
dblclick:function(p){
alert("dblclick");
}
}
}
event的成员名作为侦听的事件名,值函数作为event handler。
handler的传入参数结构如下:
{
sender:{事件源},
event:{事件},
type:{事件类型},
org_data:{原始数据},
new_data:{新数据}
}