var elem = document.getElementsByTagName('div')[13]; if(elem && elem.firstChild){ var num = Math.floor(+elem.firstChild.nodeValue.replace(',', '.')); alert(num); }