JS dynamically add DOM click event of acquisition is less than the current node. invalid

Btn node class name is added dynamically me.

. $ (. "BTN") the Click (function (E) {
         $ (the this) or $ (e.target) not obtain the current element
   });

Changed

$ (Document) .on ( "the Click", ".btn", function (E) {
           $ (the this) or $ (e.target) Gets the current element
})

Guess you like

Origin www.cnblogs.com/zypblogs/p/11125921.html