title: Get text in getElementsByClassName
body: <p>I am writing some javascript to be run in a bookmarklet that should get the text within a element that has a certain class name.</p>
  
  <p>So for example</p>
  
  <pre><code>document.getElementsByClassName('price')
  </code></pre>
  
  <p>where the web page has or example</p>
  
  <pre><code>&lt;span class="price"&gt;
  
      £23
  
  &lt;/span&gt;
  </code></pre>
  
  <p>How would I go about getting the actual text within the the element that has a class name price (i.e £23 in the above example).</p>