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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:56:54+00:00 2026-05-16T21:56:54+00:00

Using the JavaScript sample found in this stack overflow post you can have a

  • 0

Using the JavaScript sample found in this stack overflow post you can have a button that automatically selects a table. This selected table can then be copied to the clipboard.

My users will be copying this data into an Excel template and do not need the header information (<th></th> or <thead></thead>).

My table looks something like this:

<table class="sortable">
<thead>
  <tr><th>Person</th><th>Monthly pay</th></tr>
</thead>
<tbody>
  <tr><td>Bob</td><td>£12,000</td></tr>
  <tr><td>Doug</td><td>£8,500</td></tr>
  <tr><td>Sam</td><td>£9,200</td></tr>
  <tr><td>Nick</td><td>£15,300</td></tr>
</tbody>
<tfoot>
  <tr><td>TOTAL</td><td>£45,000</td></tr>
</tfoot>
</table>

How would I go about unselecting the header information?

UDPATE1

The key is to select the tbody (assuming you Do not want tfoot).

<input type="image" src="table.png" name="image" onclick="selectElementContents( document.getElementById('theebody') );">
  • 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-16T21:56:55+00:00Added an answer on May 16, 2026 at 9:56 pm

    If the <table> has a <thead> and <tbody>, you could just select the <tbody>. However if you have header row(s) as sibling of other rows… here is a good start on how to set the range with more control.

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

Sidebar

Ask A Question

Stats

  • Questions 535k
  • Answers 535k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try changing (b>>(1<<(n-1-i))) to just (b>>(n-1-i)&1). Edit: Forgot to mention… May 17, 2026 at 1:06 am
  • Editorial Team
    Editorial Team added an answer I would recommend devise (http://github.com/plataformatec/devise). I found it very easy… May 17, 2026 at 1:06 am
  • Editorial Team
    Editorial Team added an answer Since you say this is in your code, you could… May 17, 2026 at 1:06 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am looking for some help. I have found this script that sort of
This is a javascript question. The fact that it mentions this website is irrelevant.
I'd like to find (using javascript) all of the references to image links on
I'd like to select the image source url from html code using javascript regexp.
I'm using javascript to request a image generated by the server in real time.
Using R, I generate a list that contains certain unquoted elements. Please see at
I have been using asp.net programming just from few months and I have to
I am working on a rails project. Using the tag observe_field, I am taking
I have a problem with jquery not loaded in an asp user control. I
Hey all, my first post :D Problem: I'm trying to make a template gallery,

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.