javascript - Search HTML Table with JQuery -
I have a table and a specific column is required in a particular line.
& lt; TR & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; Td square = "important_column" & gt; & Lt; A href = "/ bla / blah / link" & gt; Important information & lt; / A & gt; & Lt; / Td> & Lt; TD & gt; & Lt; / TD & gt; & Lt; Td class = "need_link_here" & gt; & Lt; A href = "/ I / watt / this / link /" & gt; Link & lt; / A & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; / TR & gt;
So if the link in "important_column" is the same as searching for text. Get the link text in the "need link_here" column & lt; A & gt; & Lt; / A & gt; Text between
- How to do in JQuery?
You can use to see that an element is in specific text:
$ ("Important information" in Table TD:) .next (). Next (). Child ("a");
< Strong> EXAMPLE -
Comments
Post a Comment