我有一個單擊事件附加到錶行和列內我有複選框。錶行單擊事件和複選框
<table>
<tbody>
<tr class='shop_order_single_table'>
<td><input type='checkbox' /></td>
<td><input type='checkbox' /></td>
<td><input type='checkbox' /></td>
</tr>
</tbody>
</table>
當我點擊複選框時,該行的click事件仍然執行。
這裏是我的代碼:
$(".shop_order_single_table").on("click",function() {
//click event executes
});
我如何對錶行點擊複選框時不執行的單擊事件?
http://stackoverflow.com/questions/9183381/how-to-have-click-event-only-fire-on-parent-div-not-children – Jordumus 2015-04-01 12:33:20
請參見[「的問題是否應包含「標籤「?」](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles),其中的共識是「不,他們不應該」! – 2015-04-01 13:28:12