87,997
社区成员




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function rmRow(t) {
var idx = t.parentNode.parentNode.rowIndex;
document.getElementById('tb').deleteRow(idx);
}
</script>
</head>
<body>
<table id="tb">
<tr><td>TEST_ROW1</td><td><input type="button" onclick="rmRow(this);" value="REMOVE" /></td></tr>
<tr><td>TEST_ROW2</td><td><input type="button" onclick="rmRow(this);" value="REMOVE" /></td></tr>
</table>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function deleteSelf(obj) {
var trobj = obj.parentNode.parentNode;
trobj.parentNode.removeChild(trobj);
}
</script>
</head>
<body>
<table>
<tr><td>1</td><td><a href="#@" onclick="deleteSelf(this);">删除自己</a></td></tr>
<tr><td>2</td><td><a href="#@" onclick="deleteSelf(this);">删除自己</a></td></tr>
<tr><td>3</td><td><a href="#@" onclick="deleteSelf(this);">删除自己</a></td></tr>
</table>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<table id="tb">
<tr><td>TEST</td><td><input type="button" onclick="document.getElementById('tb').deleteRow(this.parentNode.parentNode.rowIndex);" value="REMOVE" /></td></tr>
</table>
</body>
</html>