I have a table , in some of <td> , I have an anchor tag with values . I have to find the value of this by looping.
Here is what I am trying:
$(tr).find('td').each(function() {
var cells = $(this).html();
var check = $(cells).find("a");
}
I am getting an error at :
var check = $(cells).find("a");
because
the first <td> value is "SomeText"
and second <td> value is
Edit:
"<input id="1"> <a > 188</a></input>"
I am trying to extract the output as 188
$(tr).find("td a")?<input id="1" <a > 188</a><inputis invalidhtml"<input id="1" <a > 188</a><input"then you've got invalid html. Why are both inputs missing a closing>?atag in themvar check = $(this).find("a");