Home  >  Q&A  >  body text

javascript - cps internal limitations when binding events to a tag. How to add events externally and introduce them

atag

Added binding event

Error reported

js imported from the page

What I simulated in chrome is correct

Now I don’t know how to bind this event and introduce it

某草草某草草2681 days ago452

reply all(3)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-19 10:33:00

    The code combined with 1 is imported from outside and placed under the executable directory

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-19 10:33:00

    $(function() {
        $(window.document).on('click', '#myFavor', function() {
            OCA...
        });
    });
    1. The monitoring code part should be pre-loaded before the event operation.

    2. Check whether there is any synchronization blocking problem in the JS code part.

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-19 10:33:00

    Put him in front of </body>

    reply
    0
  • Cancelreply