是否可以销毁 html 按钮。如果点击它是因为点击后它已经达到了目的。
最佳答案
您可以使用 JavaScript 来做到这一点:
<button onclick="this.parentNode.removeChild(this)">Label</button>
关于javascript - html 中的自毁按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2132483/