Hi Frnds,
Can Anyone tell me, how can I ,
Change the BACKGROUND color of selected text in TEXTAREA

sanjiv

1. Assign an id or a class to the textarea.

2. For css, assign a color string ("#rrggbb") to background-color for the id or the class.

3. For JavaScript control, use a statement such as this:

document.forms.myid.style.backgroundColor = colox;

where colox contains a color string.

You misread the requirements. The task is to change the background color of the selected text in a textarea and not the background color of the textarea.

If you know that then why you didn't give him the answer ?
try to give them a positive answer not to discourage ...

> If you know that then why you didn't give him the answer ?
Because there is none.

> try to give them a positive answer not to discourage ...
You should look for answers and not pleasing words.

If you want to change the color the selection becomes when selected, that is a Windows setting, not a web setting. The setting is in the Control Panel, and is under the control of the owner of the computer, not the webmaster.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.