Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试element.parentNode.removeChild()方法。它在 Firefox 中运行良好,但在 IE 9 中无法运行。
element.parentNode.removeChild()
谁能告诉我如何使用javascript删除IE中的元素?
谢谢...
在元素的 parentNode 中使用removeChild函数。
removeChild
如果element是需要删除的节点,则执行以下操作:
element
element.parentNode.removeChild(element)