Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8337963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:26:57+00:00 2026-06-09T04:26:57+00:00

I am a complete newbie at Javasript and would like to work out how

  • 0

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?

Any help is very much appreciated to aid understanding of javascript. Thanks.

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

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

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

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

...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:26:58+00:00Added an answer on June 9, 2026 at 4:26 am
    document.getElementById("song_1").getElementsByClassName("producedBy")[0]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a complete newbie to BDD and I would like to understand where
I am complete newbie in mod_rewrite , and I have been going through some
I am a complete newbie to SSIS. I have a c#/sql server background. I
WARNING: Complete newbie to RoR and Ruby alert! * I have a login method
Firstly I'm a complete newbie when it comes to SQL Server. I have five
I'm a complete newbie with MySQL indexes. I have several MyISAM tables on MySQL
I'm a complete rails newbie, so forgive me if this is trivial. I have
I am a complete newbie(as is already evident) and I can't just figure out
I am complete newbie to Android development and I have to make a Home
Warning: complete newbie Xcode question. In MainViewController.h I have the following line: IBOutlet WorkItem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.