Node.replaceChild()

var oldEle=document.querySelectorAll('#bigcontainer table')[2]; //Original Element
var newEle=document.createElement('div'); //New Element
oldEle.parentNode.replaceChild(newEle,oldEle);

Node.replaceChild - MDC Doc Center