如何删除一个html标签的方法

< DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>
例:
var   div   =   document.getElementByIdx("DivId");  
  div.style.display   =   "none";   //隐藏而不删除  
  div.parentNode.removeChild(div);   //删除
以上可以用于ff和ie

div.removeNode(true);
只适用ie
原文地址:https://www.cnblogs.com/netcorner/p/2912437.html