• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

check tr background color

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to judge a tr background color ?


in the coding above, it always shows "ffffffffffffff", but actually it sets and displays tr background color as "#66FF99".

The logic is , first time user clicks one tr, it change background color, when user clicks it again (like unselect), the color will be changed back.

Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
debug this:

alert(tr.style.backgroundColor);

what does it say

Eric
 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
--- #66FF99
Maybe some empty space? I need to trim it?

Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
 
Liu Zhixiang
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure it's #66FF99 (instead of #66ff99 )?


Eric's method is good!
[ September 21, 2006: Message edited by: Liu Zhixiang ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic