jquery元素事件

$().bind(元素事件,参数,方法),如没有参数方法做第二个参数

例子:有参数$("img").bind("click","hello",function (event){alert(event.date)})

无参数$("img").bind("click",function (event){alert("sdfasd")})

最好将方法写出来,这样更规范,也不容易出错

$().unbind(元素事件,方法名)删除方法,如多个方法空格隔开

$().元素事件.(方法)

例子:$("img").click(function(event){alert("asdf")})

event属性

原文地址:https://www.cnblogs.com/weiwin/p/2685555.html