Home >Web Front-end >JS Tutorial >jquery delete table selected row

jquery delete table selected row

php中世界最好的语言
php中世界最好的语言Original
2018-04-23 17:11:093513browse

This time I will bring you jqueryDelete the selected rows of the table, what are the precautions for deleting the selected rows of the table with jquery, the following is a practical case, let's take a look.

jQuery deletes the current line, just pass this:

"+rs+"   删除 


//删除当前行
 function deleteTr(nowTr){
  //多一个parent就代表向前一个标签,
  // 本删除范围为<td><tr>两个标签,即向前两个parent
  //如果多一个parent就会删除整个table
    $(nowTr).parent().parent().remove();
 }

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to php Chinese Other related articles online!

Recommended reading:

How to implement paging function in jquery ajax

Use jQuery to do page jump

The above is the detailed content of jquery delete table selected row. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn