aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes check tr background color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "check tr background color" Watch "check tr background color" New topic
Author

check tr background color

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
debug this:

alert(tr.style.backgroundColor);

what does it say

Eric
Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
--- #66FF99
Maybe some empty space? I need to trim it?

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://radio.javaranch.com/pascarello/2005/05/19/1116513366466.html
Eric
Liu Zhixiang
Ranch Hand

Joined: Aug 12, 2006
Posts: 32
Are you sure it's #66FF99 (instead of #66ff99 )?


Eric's method is good!
[ September 21, 2006: Message edited by: Liu Zhixiang ]

I Think Therefore I Am
 
Consider Paul's rocket mass heater.
 
subject: check tr background color