
parentElement.removeNode(true),IE下正常,火狐、谷歌下失效,帮忙解决一下。
<tableborder="1"><tr><td>1</td><td><inputtype="button"onclick="this.parentElement.par...
<table border="1">
<tr>
<td> 1</td>
<td> <input type="button" onclick="this.parentElement.parentElement.removeNode(true);" value="删除这一行"></td>
</tr>
<tr>
<td> 2</td>
<td> <input type="button" onclick="this.parentElement.parentElement.removeNode(true);" value="删除这一行"></td>
</tr>
<tr>
<td> 3</td>
<td> <input type="button" onclick="this.parentElement.parentElement.removeNode(true);" value="删除这一行"></td>
</tr>
</table> 展开
<tr>
<td> 1</td>
<td> <input type="button" onclick="this.parentElement.parentElement.removeNode(true);" value="删除这一行"></td>
</tr>
<tr>
<td> 2</td>
<td> <input type="button" onclick="this.parentElement.parentElement.removeNode(true);" value="删除这一行"></td>
</tr>
<tr>
<td> 3</td>
<td> <input type="button" onclick="this.parentElement.parentElement.removeNode(true);" value="删除这一行"></td>
</tr>
</table> 展开
2个回答
展开全部
您好!很高兴为您答疑!
可以这样写this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
您可以在火狐社区了解更多内容。希望我的回答对您有所帮助,如有疑问,欢迎继续在本平台咨询。
可以这样写this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
您可以在火狐社区了解更多内容。希望我的回答对您有所帮助,如有疑问,欢迎继续在本平台咨询。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询