Link to home
Start Free TrialLog in
Avatar of yongsing
yongsing

asked on

Set readOnly color same as disabled color

I have a text field, and I use javascript to set its "readOnly" attribute to true dynamically. The text color is still black. Is it possible to make this color the same as when the "disabled" attribute is set to true, which is grey? Thanks.
Avatar of KennyTM
KennyTM

set:

[textfield].style.color = "GrayText";
ASKER CERTIFIED SOLUTION
Avatar of third
third
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial