var anchor; while ( anchor = document.anchors[0] ) { anchor.parentNode && anchor.parentNode.removeChild( anchor ); }