Accessing specific html elements values without changing the HTML
<p>I am a complete newbie at Javasript and would like to work out how to access specific elements. I have over 20 song spans with content. If I already have the span ID for example "song 3" within a variable in the script, how do I access the "producedBy" class relating to that song, more specifically, the text held inside it which in this case says "whatever the weather". Without changing the underlaying HTML?</p>

<p>Any help is very much appreciated to aid understanding of javascript. Thanks.</p>

<pre><code>    &lt;div class="Artist Song"&gt;
    &lt;span id="song_1" class="song"&gt;   
       &lt;span class="artistname"&gt;MJ&lt;/span&gt;
        &lt;span class="songname"&gt;Billie Jean&lt;/span&gt;
        &lt;span class="email" style="whatever"&gt;&lt;strong&gt;neverland@ranch.com&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="recordlabel"&gt;def jam&lt;/span&gt;
        &lt;span class="age"&gt;34 years&lt;/span&gt;
        &lt;span class="album"&gt;Album:&lt;strong&gt;Bad&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="dateReleased" style="display:none"&gt;whatever&lt;/span&gt;
        &lt;span class="producedBy" style="display:none"&gt;Produced by Quincy jones&lt;/span&gt;
    &lt;/span&gt;
&lt;/div&gt;

&lt;div class="Artist Song"&gt;
    &lt;span id="song_2" class="song"&gt;   
       &lt;span class="artistname"&gt;Prodigy&lt;/span&gt;
        &lt;span class="songname"&gt;Firestarter&lt;/span&gt;
        &lt;span class="email" style="whatever"&gt;&lt;strong&gt;firestarter@twisted.com&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="recordlabel"&gt;whatever&lt;/span&gt;
        &lt;span class="age"&gt;whatever&lt;/span&gt;
        &lt;span class="album"&gt;Album:&lt;strong&gt;Fat of the land&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="dateReleased" style="display:none"&gt;whatever&lt;/span&gt;
        &lt;span class="producedBy" style="display:none"&gt;whatever&lt;/span&gt;
    &lt;/span&gt;
&lt;/div&gt;

&lt;div class="Artist Song"&gt;
    &lt;span id="song_3" class="song"&gt;   
       &lt;span class="artistname"&gt;Whoever&lt;/span&gt;
        &lt;span class="songname"&gt;Whatever&lt;/span&gt;
        &lt;span class="email" style="whatever"&gt;&lt;strong&gt;whatever@wherever.com&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="recordlabel"&gt;whatever&lt;/span&gt;
        &lt;span class="age"&gt;whatever&lt;/span&gt;
        &lt;span class="album"&gt;Album:&lt;strong&gt;Whatever&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="dateReleased" style="display:none"&gt;whatever&lt;/span&gt;
        &lt;span class="producedBy" style="display:none"&gt;whatever the weather&lt;/span&gt;
    &lt;/span&gt;
&lt;/div&gt;

&lt;div class="Artist Song"&gt;
    &lt;span id="song_4" class="song"&gt;   
       &lt;span class="artistname"&gt;Whoever&lt;/span&gt;
        &lt;span class="songname"&gt;Whatever&lt;/span&gt;
        &lt;span class="email" style="whatever"&gt;&lt;strong&gt;whatever@wherever.com&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="recordlabel"&gt;whatever&lt;/span&gt;
        &lt;span class="age"&gt;whatever&lt;/span&gt;
        &lt;span class="album"&gt;Album:&lt;strong&gt;Whatever&lt;/strong&gt;&lt;/span&gt;
        &lt;span class="dateReleased" style="display:none"&gt;whatever&lt;/span&gt;
        &lt;span class="producedBy" style="display:none"&gt;whatever&lt;/span&gt;
    &lt;/span&gt;
&lt;/div&gt;

...
</code></pre>
