Node.js examples for DOM:Element
Get inner or outer HTML
outerHTML: function (node) { // if IE, Chrome take the internal method otherwise build one return node.outerHTML || (function (n) { var div = document.createElement('div'), h; div.appendChild(n.cloneNode(true));/*w ww.j av a2 s .c o m*/ h = div.innerHTML; div = null; return h; })(node); },