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

  • SEARCH
  • Home
  • 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 8988485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:01:07+00:00 2026-06-15T22:01:07+00:00

How can I safe the word Good and the numbers in a variable? <div

  • 0

How can I safe the word “Good” and the numbers in a variable?

<div id="infoTable">
    <div class='info' label='Good' value='1' minvalue='2' maxvalue='3'></div>
    <div class='info' label='Bad' value='4' minvalue='5' maxvalue='6'></div>
</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-15T22:01:07+00:00Added an answer on June 15, 2026 at 10:01 pm

    First you find the div they’re in:

    var theDiv = $("#infoTable div").first();
    

    That uses $ to find the divs inside your infoTable div, then uses first to get just the first one. (You can also do var theDiv = $("#infoTable div:first"); but it’s probably no more efficient.)

    Then you read its attributes:

    var theLabel = theDiv.attr("label");
    var theValue = theDiv.attr("value");
    // ...and so on
    

    If you want the numbers as numbers rather than strings:

    var theValue = parseInt(theDiv.attr("value"), 10);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I quickly prove that the following class is not thread-safe (as it
i am not understanding how below code snippet can be made thread safe. class
I wanted to understand how we can implement a safe logout method in a
How can we use Visual Source Safe plug-in in standalone Aptana installment. People say
How can I allow users to execute mathematical expressions in a safe way? Do
Is there a way I can ask Visual source safe to get all the
Given doubles can't be used in volatile fields, is this a safe alternative? Or
I have this unsafe code that I need to make safe so it can
I am doing some research on developing thread safe applications. I know users can
To create a delegate from a method you can use the compile type-safe syntax:

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.