Programming Tips - How do I remove/delete a node from the DOM using javaScript?

Date: 2010feb16 Language: javaScript Platform: web Q. How do I remove/delete a node from the DOM using javaScript? A. Here's a function that does that:
function removeNode(obj) { var p; if (obj == null) return; if ((p = obj.parentNode) == null) return; p.removeChild(obj); } function exampleUse() { var obj; obj = document.getElementById('that_thing'); removeNode(obj); }