返回值: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); }); });
家里想测一下甲醛,想租一个甲醛仪用一下,需要30个助力,求助力~
助力步骤:微信扫码,关注一下公众号,然后取消关注即可。
当前执行的处理器被绑定的时候,包含可选的数据传递给jQuery.fn.bind。
The description of the example.
$("a").each(function(i) { $(this).bind('click', {index:i}, function(e){ alert('my index is ' + e.data.index); }); });