Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple javascript/css question

Status
Not open for further replies.

786snow

Programmer
Nov 12, 2006
75
0
0
How can I use javascript and css to change the background color of my text box
I tried the following that did not work

Code:
.textHilight {

background:00BFFF;
}




<input type="text" class="textbox" name="toDate" id="toDate" size=10 maxlength=10 value=>




document.getElementById('toDate').class= textHilight;





the following work but I wanted to do it using css



Code:
document.getElementById("toDate").style.backgroundColor = "#dd0000";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top