title: DOM/Javascript: get text after tag
body: <p>How do I get the text "there" that comes after a tag in an html document:</p>
  
  <pre><code>&lt;p&gt;&lt;a&gt;hello&lt;/a&gt;there&lt;/p&gt;
  </code></pre>
  
  <p>I see that there is a way to do it with xpath: </p>
  
  <p><a href="https://stackoverflow.com/questions/4920695/get-text-from-next-tag">Get text from next tag</a></p>
  
  <p>but I'm not using xpath and am hoping not to have to start just for this. I realize that I can get ALL the text inside the p tag, but I want to get just the "there" text, as well as know its relationship to the p and a tags. It doesn't seem to be anyone's child or sibling. (You can assume that I can get any of the other elements/nodes so it can be relative to those.)  Every DOM tutorial seems to ignore the fact that text can occur outside tags. </p>
  
  <p>Thanks.</p>