Get the id of a the item that is clicked

前端 未结 10 1874
执念已碎
执念已碎 2020-12-11 09:26

I have this html code:

FOO
FOO2


        
10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 09:59

    $('.edit').live('click', function() {
        alert( this.id );
    });
    

    Sample
    http://jsfiddle.net/ck2Xk/

提交回复
热议问题