<div class="codetitle"> <span><a style="CURSOR: pointer" data="62434" class="copybut" id="copybut62434" onclick="doCopy('code62434')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code62434"> <br><tr> <br><td width="10%"> <br><property value="#owner.id"></property> <br> </td> <br><td width="20%"> <br><property value="#owner.name"></property> <br> </td> <br><td width="15%"> <br><property value="#owner.floor"></property> <br> </td> <br><td width="15%"> <br><property value="#owner.number"></property> <br> </td> <br><td width="20%"> <br><property value="#owner.telephone"></property> <br> </td> <br><td width="20%" align="center"> <br><a href="addOwner.jsp">添加</a>| <br><a href="javascript:void(0)" onclick="updateOwner(<s:property value="></a>,'<property value="#owner.name"></property>','<property value="#owner.floor"></property>','<property value="#owner.number"></property>','<property value="#owner.telephone"></property>')"> <br>修改| <br><a href="javascript:void(0)" onclick="deleteOwner('<s:property value="></a>',this)">删除 <br> </td> <br> </tr> <br> </div> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="54148" class="copybut" id="copybut54148" onclick="doCopy('code54148')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code54148"> <br>function deleteOwner(id,obj){ <br>var o=$(obj); <br>if(confirm("确定删除?")){ <br>$.post( <br>"deleteOwner!deleteOwner", <br>{id: id}, <br>function(){ <br>alert("删除成功!!!"); <br>o.parents("tr").remove(); <br>} <br>); <br>} <br>} <br> </div> <br>1.刚开始因为this放错位置了,死活不成功!得注意。 <br><br>2.直接用obj报错,要将其打包成对象$(obj)