devxlogo

Change the Background Color of a Table Cell Using JavaScript

Change the Background Color of a Table Cell Using JavaScript

Let the table cell be like this:

 ...

The JavaScript code to change the color to blue is:

    if (document.all)      document.all.aCellID.style.backgroundColor = 'blue';

devx-admin

Share the Post: