Solved

Javascript - Changing label background color

Posted on 2007-04-01
2
2,080 Views
Last Modified: 2012-06-21
I am using javascript and C# ASP.net.  I am wanting to change the color of a label within a function in JavaScript.  It is a specific label that I want to make a specific color within the function.   How can I do this?

Thanks
0
Comment
Question by:vandy02
  • 2
2 Comments
 
LVL 26

Accepted Solution

by:
DireOrbAnt earned 250 total points
ID: 18834251
// To change the font's color
document.getElementById("LabelId").color = "red";
0
 
LVL 26

Expert Comment

by:DireOrbAnt
ID: 18834253
Make that:
document.getElementById("LabelId").style.color = "red";
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now