faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 5 people (40%) answered Yes
Recently 2 of 5 people (40%) answered Yes

Entry

How can I change the bg color and text of a cell when it is clicked?

Apr 8th, 2008 18:50
ha mo, Dave Clark, Tee Hardin,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tee,
     The following will change the foreground and background color of 
a table cell when it is clicked:
<td onclick="this.style.color='yellow';
 this.style.backgroundColor='blue';
 return true;">text</td>
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com