【发布时间】:2017-07-13 16:48:57
【问题描述】:
我尝试用这个在表格的每一行上设置点击事件。
这是表:
<table border='1px'>
<tr>
<td class='td'>first row frist column</td>
<td>first row second column</td>
</tr>
<tr>
<td class='td'>second row frist column</td>
<td>second row second column</td>
</tr>
<tr>
<td class='td'>third row frist column</td>
<td>third row second column</td>
</tr>
</table>
这是简单的 jQuery:-
$('table tbody tr td:nth-child(1)').live('click',function(){
alert($(this).text());
})
有了这个我点击任何第一列然后在它的警报我想取消设置表第一行列点击事件。
我该怎么做。
【问题讨论】:
标签: jquery html html-table click