I want to have the text value from a inside a element.
html:
Try this:
function myfunction(li) { var TextInsideLi = li.getElementsByTagName('p')[0].innerHTML; }
Live demo