how can i get value from label control (using javascript)

liunx

Guest
how can i get value from label control of dotnet wsing javascript. i want to clear the contents of label control on the click of button.

can any one help


thanksUse: <variableName> = <formName>.getElementByID(<yourLabelID>).value

Let me know if it yealds results.

:)hi oak,

it wont work.... but i found a way for it


var label=document.getElementById('lblVoucher');
label.innerHTML=''
this will set the label value to null


thanksI was just referring to the method to get the value of the label control.

Its good to see that you figured out that there was actually another step involved in clearing the contents ;)

Good job.

All the best!
 
Back
Top