编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
jQuery API 开发手册

返回值:Anythingevent.data

V1.1概述

当前执行的处理器被绑定的时候,包含可选的数据传递给jQuery.fn.bind。

示例

描述:

The description of the example.

jQuery 代码:
$("a").each(function(i) {
    $(this).bind('click', {index:i}, function(e){
       alert('my index is ' + e.data.index);
    });
  });   
相关文章
event.data jqueryevent.isimmediatepropagationstopped jqueryevent.ispropagationstopped jqueryevent.namespace jqueryfocusout data fn jqueryjquery.data element key value jqueryjquery.get url data callback type jqueryjquery.getjson url data callback jquerymouseup data fn jqueryon events selector data fn jqueryone type data fn jqueryjquery dblclick data fn jquery error data fn jquery eve.datajquery mousedown data fn jquery mouseenter data fn jquery mouseleave data fn php libevent 函数 read data from a buffered eventphp libevent 函数 write data to a buffered eventphp swoole event write data to the socket.
关注编程学问公众号
编程学问网 湘ICP备20001732号