Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-22-2004, 06:52 AM   PM User | #1
tvbas
New Coder

 
Join Date: Jan 2004
Location: undefine
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
tvbas is an unknown quantity at this point
SOS!How can I get "tr" bgcolor?

I want to chang "tr" bgcolor when doble-click it, but I fail because I can not get "tr" bgcolor.The codes appear like this:
<html>
<body>
<table width="200" border="1">
<tr bgcolor="#FFFFFF" id="tr" align="center" onDblClick="alert(tr.align);alert(tr.bgcolor)">
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
__________________
undefine
tvbas is offline   Reply With Quote
Old 03-22-2004, 07:02 AM   PM User | #2
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
Should be:

<tr bgcolor="#FFFFFF" id="tr" align="center" ondblclick="alert(this.bgColor)">

But you must start now to learn and apply CSS in favor of old attributes like align and bgcolor.

<tr style="background-color:#FFFFFF;text-align:center" ondblclick="alert(this.style.backgroundColor);alert(this.style.textAlign);">
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:13 PM.


Advertisement
Log in to turn off these ads.