从表中删除第二行

And*_*rej 1 javascript jquery

我想用jquery删除表格的第二行.

我试过了:

$("tr:second").remove();
Run Code Online (Sandbox Code Playgroud)

但遗憾的是,这不起作用:(任何建议?

Joh*_*hnP 8

你需要使用

$("tr:eq(1)").remove();
Run Code Online (Sandbox Code Playgroud)

它基于零,所以索引1是你的第二行