나는 이걸로 모든 행에서 테이블에 대한 클릭 이벤트를 설정하려고합니다. 첫 번째 행의 테이블에서 클릭 이벤트를 제거하는 방법
이
는 테이블 :<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());
})
는 내가 설정되지 않은 테이블의 첫 번째 행의 열을 클릭합니다의 경고에 먼저 열 중 하나를 클릭 행사.
어떻게하면됩니까?
두 번째 열 ID를 설정하고 싶습니다 ... 어떻게? –
확인 업데이트 답변 n 데모 – yeyene
아니요 ... 첫 번째 행의 두 번째 열을 설정하고 싶습니다. '