Wednesday, February 15, 2012

html2text

function html2text(){
var o={};
o.txt='';
o.t = document.getElementsByTagName('*');
for(o.i in o.t){
if(o.t[o.i].childElementCount > 0){
console.log(o.t[o.i].childElementCount, o.t[o.i].tagName);
}else{
console.log(o.t[o.i].innerHTML);
}
}
}

The World’s 50 Most Innovative Companies 2012 | Fast Company