Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get the class name of 'th' under a table from javascript

 
jack fe
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys:
I have a known value got from server.
If it is 0, then I need to know class name of <th> for 'Site ID'.
If it is 1, then I need to know class name of <th> for 'Site Name'.

how to use javascript to do that?
Thanks.

code:
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code all spaced out


Code combined to a line



And if you were using jQuery:



Eric

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic