I want to have the text value from a inside a element.
html:
Alternatively, you can also pass the li element itself to your myfunction function as shown:
function myfunction(ctrl) { var TextInsideLi = ctrl.getElementsByTagName('p')[0].innerHTML; }
and in your HTML,