2010-01-23 72 views

回答

0
$('div#test div:last-child'); 
+0

試過這個,它沒有奏效。公認的解決方案。 – 2011-11-13 20:04:06

8

沒有jQuery的:

var divs = document.getElementById("test").getElementsByTagName("div"); 
var lastChild = divs[divs.length - 1]; 
相關問題