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 6710493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:01:46+00:00 2026-05-26T08:01:46+00:00

How do i fetch the text within the div using id selector i.e test@test.com

  • 0

How do i fetch the text within the div using id selector i.e test@test.com in this case using jQuery.

<div class="g10 edit_trader" id="email_54">test@test.com</div>

the following code fetch the value email_54

$('edit_trader').attr('id')

i tried using

$('edit_trader').attr('id').val();
$('edit_trader').attr('id').text();
$('edit_trader').attr('id').html();

nothing works.

thank you..

  • 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-05-26T08:01:46+00:00Added an answer on May 26, 2026 at 8:01 am

    An id selector is prefixed with #. So if you wanted to get the contents of an element with id = email_54 you could do this:

    var text = $('#email_54').text();
    

    And if you wanted to use a class selector you should prefix with .:

    var text = $('.edit_trader').text();
    

    But of course in this case since you could have multiple elements with the same class you might get an array as a result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to fetch some simple text over HTTP from JavaScript: $(function() { $.get(http://mydomain.com/path,
I'm using jQuery to automatically fetch the most recent post on a blog. jQuery.get()
I'm creating a little algo to fetch text from web sites.. then find answers
I understand how to fetch a URL text page and loop over the results
I'm fetching some data from an MSSQL table using the mssql_fetch_object, but the text
I'm trying to fetch Wikipedia pages using LWP::Simple , but they're not coming back.
How can I fetch images from a server? I've got this bit of code
Ok, I would like to use a CASE STATEMENT for this, but I am
I have a records in my table Test like this my Date column is
I can't fetch text value with Node.getNodeValue() , Node.getFirstChild().getNodeValue() or with Node.getTextContent() . My

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.