Home > Web Front-end > JS Tutorial > body text

jquery delete table selected row

php中世界最好的语言
Release: 2018-04-23 17:11:09
Original
3459 people have browsed it

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+"   删除 

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!