Home > Web Front-end > JS Tutorial > jquery code to delete a row in the table through a tag_jquery

jquery code to delete a row in the table through a tag_jquery

WBOY
Release: 2016-05-16 17:11:06
Original
1656 people have browsed it
复制代码 代码如下:

复制代码 代码如下:

function deleteOwner(id,obj){
var o=$(obj);
if(confirm("确定删除?")){
$.post(
"deleteOwner!deleteOwner",
{id: id},
function(){
alert("删除成功!!!");
o.parents("tr").remove();
}
);
}
}

1.刚开始因为this放错位置了,死活不成功!得注意。

2.直接用obj报错,要将其打包成对象$(obj)
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