I want to have the text value from a inside a element.
html:
change your html to the following:
This Text
then you can get the content of your paragraph with the following function:
function getContent() { return document.getElementById("myParagraph").innerHTML; }