$(".floatX").on('click',function () { console.log(this); }); $(".floatX").click(function () { console.log(this); });
无效使用
正确方法:外部容器绑定事件,子元素内部触发
$("#Container").on('click','.floatX',function () { console.log("this"); });
上一篇:js数组与字符串的相互..
下一篇:jquery获取文档高度和..