📜  jquery find index of this - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:00.439000             🧑  作者: Mango

代码示例2
$(document).ready(function() {

    $("#example div").click(function() {
        var index = $("#example div").index(this);
        $("#example_index").html("Index " + index + " was clicked");
    });
   
});