2014-06-09 4 views

답변

2

당신이 손에 JQuery와는 매우 간단 경우 단지

$('table tr:last-child td:last-child) 

당신에게

1

당신은 querySelector()으로 시도 할 수있는 모든 테이블의 마지막 행의 마지막 COL 제공해야합니다 :

var val = document.querySelector('table tr:last-child td:last-child').innerHTML 

Example

1

다음과 같이 할 수 있습니다.

var table = document.getElementById('tableID'); 
var num = table.rows[3].cells.length 
var x = table.rows[3].cells[num - 1].innerHTML; 

JSfiddle for test

관련 문제