Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

$("table td").click(function(){ /*……*/ })

这种写法不能处理动态添加的“td”,所以改成下面这种:

$("table").on("click","td",function(){ /*……*/ })

但是现在需要处理一种特殊的,不需要包含某一种:

$("table td").not($(".check")).click(function(){ /*……*/ }),

现在想问的是:怎么像上面那样,把参数写进去,格式是什么样的。。。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
178 views
Welcome To Ask or Share your Answers For Others

1 Answer

$('table').on('click','td:not(.check)',handler)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...