i want to validate a label by using displayed text
if the label showedtext is "yes" ------nothing to do
if the label showedtext is "no"--------notify the user the text in label is no
-----------thanks advance----------------
How to validate label by text in javascript
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Feb 8, 2014, 2:21 AM EST
if($('.yourlabel').val() === 'yes'){
//do something
}else{
}
What is your problem here?
Post your code....
SUNIL GUTTARank #1,832 · 810 reputationPosted Feb 10, 2014, 4:32 AM EST
if(document.getElementById("label1").value.Trim()=="no")
{
Alert("label1 content is NO do something");
}
//else is not necessary just because u don't want to do anything .......
Regards