search

Home  >  Q&A  >  body text

javascript - How to determine the method name to call for a self-executing function?

There is a dom1 in the page that has used on to delegate the click event, but a batch of dom1s will be dynamically loaded later. I am now turning this click event into a method. .
The method will be executed again after loading. .

Is there a better way

高洛峰高洛峰2876 days ago368

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-05-19 10:23:38

    Hang the event on the public parent element and act as an event proxy.

    reply
    0
  • Cancelreply