0

次のように、テーブルに 3 つの行があるとします。

$("tr").filter(function(){ return $(this).text() == '1'; }).text('One');
$("tr").filter(function(){ return $(this).text() == '2'; }).text('Two');
$("tr").filter(function(){ return $(this).text() == '3'; }).text('Three');

行 3 が行 1 になるように行を再配置するにはどうすればよいですか?

4

1 に答える 1

0
one = $("tr").filter(function(){ return $(this).text() == '1'; }).text('One');
two = $("tr").filter(function(){ return $(this).text() == '2'; }).text('Two');
three = $("tr").filter(function(){ return $(this).text() == '3'; }).text('Three');
one.before(three);
于 2013-06-05T17:42:33.850 に答える