Thanks for ur reply.
I find the definition of "setAttribute". I am now able to change the background colors of the cells individually. Its working fine.