Link to home
Start Free TrialLog in
Avatar of Epicmanagement
Epicmanagement

asked on

JavaScript syntax to change the text of a label ? document.getElementById('ControlName').text = 'hello' ??;

JavaScript.  ASP.NET, VB.NET.  .NET 2.0

How can I use JavaScript to change the text of a label ?

I need to know the syntax.  Something like this:
 document.getElementById('ControlName').value = 'HelloWorld';

But .value doesn't work.  I've tried .text also.  Any ideas ?
SOLUTION
Avatar of petiex
petiex
Flag of United States of America 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
SOLUTION
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
document.getElementById('ControlName').innerText='HelloWorld';
ASKER CERTIFIED SOLUTION
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