how to get javaScript event source element?

后端 未结 6 638
夕颜
夕颜 2020-12-23 16:20

Is there a way to retrieve the element source of an inline javaScript call?

I have a button like this:

6条回答
  •  失恋的感觉
    2020-12-23 17:10

    USE .live()

     $(selector).live(events, data, handler); 
    

    As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers.

    $(document).on(events, selector, data, handler);  
    

提交回复
热议问题