日期:2014-05-17 浏览次数:20716 次
<table>
<tr>
<td>
<a href="javascript:void(0);" onclick="javascript:doDelete(this,'张三')">删除这一行1</a>
</td>
</tr>
<tr>
<td><a href="javascript:void(0);" onclick="javascript:doDelete(this,'李四')">删除这一行2</a>
</td>
</tr>
<tr>
<td><a href="javascript:void(0);" onclick="javascript:doDelete(this,'王五')">删除这一行3</a>
</td>
</tr>
<tr>
<td><a href="javascript:void(0);" onclick="javascript:doDelete(this,'马六')">删除这一行4</a>
</td>
</tr>
</table>
<script language="javascript">
function doDelete(obj,username) {
var url = "ur_page.action"
var param = encodeURI("?username=" + username);
url = url + param;
//alert(url);
//return;
$.post(url);
obj.parentNode.removeChild(obj);
}
</script>