jQuery中.bind() 方法?
2018-03-30 14:35
99 查看
.bind() 方法
1、定义及用法:向被选元素添加 一个或多个事件和事件触发时运行的函数。(jQuery版本1.7起,on()方法是首选)。
2、简单 示例: 向<p>元素添加一个点击事件
$("p").bind("click",function(){
alert("点我有什么事么?");
});
<p>点我!</p>
3、详细参数:$().bind(event,data,function,map);
event--必添。向元素添加的事件,多个事件用空格分隔,必须是有效事件。
data--可选。传递给事件的参数。
function--必添。事件发生时运行的函数。
map--规定事件的映射。不常用。
www.runoob.com/jquery/event-bind.html
相关文章推荐
- jQuery 1.4.2中的.bind(),.live()&.delegate()方法解析
- jQuery中事件绑定到bind、live、delegate、on方法的探究
- JQuery入门――用bind方法绑定事件处理函数应用介绍
- JQuery 1.7.2 API中bind(),on(),live()和delegate()方法的使用
- JQuery中的bind、delegate、on、live方法的区别及简单介绍
- JQuery的bind方法传递多个参数
- Jquery之Bind方法参数传递与接收的三种方法
- jQuery中bind,live,delegate与one方法的用法及区别解析
- jQuery方法区别:click() bind() live() delegate()区别
- jQuery的bind()方法使用详解
- jQuery的三种bind/One/Live/On事件绑定使用方法
- jQuery 事件中 bind 方法和blur() 方法
- jQuery的事件处理方法介绍 - bind(),live(),delegate(),on()
- jQuery事件绑定on()、bind()与delegate() 方法详解
- 原生JS事件绑定方法以及jQuery绑定事件方法bind、live、on、delegate的区别
- jQuery事件绑定on()、bind()与delegate() 方法详解
- jQuery:bind方法的使用详解
- Jquery之Bind方法--参数传递与接收的三种方法
- jQuery的三种bind/One/Live/On事件绑定使用方法
- jQuery中bind,live,delegate与one方法的用法及区别解析