JQuery

xiaoxiao2021-02-28  65

事件委托 $('#wrap').on('click', 'li', function(ev) { // this 指向委托的对象 li $(this).css('background', '#D4DFE6'); // 找到父级 ul#wrap $(ev.delegateTarget).css('border', '2px solid #f00'); })
转载请注明原文地址: https://www.6miu.com/read-62230.html

最新回复(0)