首頁  >  事件對像  > eve.data

返回值:Anything event.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);
    });
  });