87,994
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<script type="text/javascript">
function $(nodeId)
{
return document.getElementById(nodeId);
}
function removeMsg()
{
var nodeBtn = $("remove");//按钮
nodeBtn.parentNode.removeChild(nodeBtn);
}
</script>
</head>
<body>
<div id="div1">
<div id="div2">
<input type="button" id="remove" value="删除它" onclick="removeMsg();" />
</div>
</div>
</body>
</html>