This is my code:
Let s say that name
is set to john
$("#first_table").append($( #second_table ).find("tr:contains(" + name + ")"));
基本上,我在网站上有2个表格。 我想首先把内容移至第二,但只有完全匹配。 如何做到这一点?
Now if I have (for example) john
john #1
, john #2
in my table, they would all be moved. I would only like to move john
and leave john #1
and john #2
Thanks!
EDIT:
I would like the code to work to match the variable name
EXACTLY.
So if name
is JOHN
it must only get JOHN
. If it s JOHN #1
, it must only get JOHN #1
and so on. Is this possible?