title: Getting link text within a div
body: <p>I currently have an href that I'd like to pull text from. Unfortunately I don't have access to to code, and the limited code I have to work with is the following:</p>
  
  <pre><code>&lt;div id="myDiv"&gt;
    &lt;h1 class="myClass"&gt;
      &lt;a href="link"&gt;TEXT&lt;/a&gt;
    &lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'd prefer using JavaScript to obtain this information. What would be the best way to reference 'TEXT'? I've tried a couple methods using <code>getElementById</code> and <code>getElementsByClassName</code>, but each have proven unsuccessful. Thanks!</p>