i 데이터 테이블 생성을 위해 datatables
클래스를 사용하는 datatable.i에 대한 간단한 contexMenu를 작성합니다. 각 테이블을 오른쪽 클릭하여 테이블의 첫 번째 셀을 찾고 싶습니다. 어떻게 찾을 수 있습니까? 내 영어 JQuery와 죄송jQuery는 테이블의 첫 번째 셀을 찾습니다.
:
$("#showTopics tbody").bind("contextmenu",function(event) {
var aata = $(this).children('tr').children('td').eq(0).text();
alert(aata);
return false;
});
HTML은
<table id='showTopics' style='line-height:18px;'>
<thead>
<tr>
<th style='width:30%;text-align:right;'>X"</th>
<th style='width:7%;'>a</th>
<th style='width:12%;'>b</th>
<th style='width:11%;'>c</th>
<th style='width:9%;'>d</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
그래 내가 그럴 handly을 만들고 난 –