var p=document.getElementById('childId').parentNode;
var c=document.getElementById('childId');
p.removeChild(c);
alert('Deleted');
p is parent node and c is child node
parentNode is a JavaScript variable which contains parent reference
Easy to understand