语法是:父节点.removeChild(this.parentNode)

比如:oUl.removerChild(this.parentNode)

 

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script>
window.onload=function()
{
var aA=document.getElementsByTagName('a');
var oUl=document.getElementById('ul1');

for(i=0;i<aA.length;i++)
{
aA[i].onclick=function()
{
oUl.removeChild(this.parentNode);
};
}
}
</script>
</head>
<body>
<ul id="ul1">
<li >sssssss<a href="javascript:;">删除</a></li>;
<li >234<a href="javascript:;">删除</a></li>;
<li >23432424<a href="javascript:;">删除</a></li>;
<li >5555<a href="javascript:;">删除</a></li>;
<li >6666<a href="javascript:;">删除</a></li>;
<li >sssssss<a href="javascript:;">删除</a></li>;
<li >rgtret<a href="javascript:;">删除</a></li>;
<li >retetettttt<a href="javascript:;">删除</a></li>;

</ul>
</body>
</html>