js

G

Guest

I have a javascript Q:
I am trying to create an BUTTON by using createElement.
Well the button is getting created.
By default the forecolor is some kind of white insted of BLACK !!
I am not able to set the font color to black ??

var container = document.createElement('TD');
var theData = document.createElement('button');
theData.setAttribute('value','IDoc');
//theData.setAttribute('forecolor','black'); // *** I tried this way..
container.appendChild(theData);


Any suggestions pls ??
--
http://pathidotnet.blogspot.com
=====
vInAypAtHi
o__
---_,>/'_------
(_) \(_)
---------------
 
E

Eliyahu Goldin

There is no attribute 'forecolor" for button. Why not to use DHTML?

theData.style.color='black';

Eliyahu
 

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,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top