TR background

G

Gandalf

I recently discovered that TR can have background property in simple
html and in CSS but when i tried to reach TR element through
javascript document.getElementById(TR_id).style.background or
document.getElementById(TR_id).background it doesn't work.

someone know how can I reach this property through javascript

p.s (in this case i can't use the td class name to reach a specific
row background like this :

if(document.getElementsByTagName('td')[x].headers=='class_'+z)
document.getElementsByTagName('td')[x].style.background=' '
)

thanks !
 
G

Gandalf

I recently discovered that TR can have background property in simple
html and in CSS but when i tried to reach TR element through
javascript document.getElementById(TR_id).style.background or
document.getElementById(TR_id).background it doesn't work.

someone know how can I reach this property through javascript

p.s (in this case i can't use the td class name to reach a specific
row background like this :

if(document.getElementsByTagName('td')[x].headers=='class_'+z)
document.getElementsByTagName('td')[x].style.background=' '
)

thanks !

OK don't pay etention to this message TR can be reached by javascript
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top