title: Javascript get text inside a <span> element
body: <p>I need to get the text that is inside a  element.</p>
  
  <p>I can only grab the class of this element and NOT the ID.</p>
  
  <pre><code>&lt;span class="fileName"&gt;test.png&lt;/span&gt;
  </code></pre>
  
  <p>So I need a way to get <code>test.png</code>, but as you see I have only the class of the  element and not the ID.</p>
  
  <p>Just notice also that we may have more <code>&lt;span class="fileName"&gt;&lt;/span&gt;</code>, so it could look like this</p>
  
  <pre><code>&lt;span class="fileName"&gt;test1.png&lt;/span&gt;
  &lt;span class="fileName"&gt;test2.png&lt;/span&gt;
  &lt;span class="fileName"&gt;test3.png&lt;/span&gt;
  &lt;span class="fileName"&gt;test4.png&lt;/span&gt;
  </code></pre>
  
  <p>In the case we have more, like the example above, I need to get ALL the values and not only one, because I need to pass this value to another page with jQuery. So it should be able to get one value or more from that  element.</p>
  
  <p>Please help!</p>
  
  <p>And also I am not a javascript expert!</p>