window.onload=function(){ var els=document.getElementsByTagName('div')[0].getElementsByTagName('li'); alert(els); for(var i=0;i<els.length;i++) alert(els[i].outerHTML) }