|
some times you need to get outerhtml of an element . ,outerHTML is suppoeted in IE not in firefox this is how you do it.
function getOuterHTML(object) {
var element;
if (!object) return null;
element = document.createElement("div");
element.appendChild(object.cloneNode(true));
return element.innerHTML;
}
|