I have a situation like this,
Iam trying to select a label using Id selector and sets its value..Due to some reason it doesnt seem to be working
$(document).ready(function () {
$("#Label3").val("hii");
});
How do I verify that $("#Label3") has indeed selected the label.
The label is rendered like this:
<span id="Label3"></span>
You can check the number of elements in the result returned by
$("#Label3")by looking at thelength:The reason why your code doesn’t work is that you need to set
textnotval: