function serializer(div){
var serializer = new XMLSerializer();
var children = div.childNodes;
var fragment = document.implementation.createDocument().createDoc umentFragment();
for (var i = 0; i < children.length; i++) {
fragment.appendChild( children[i] );
}
var innerXML = serializer.serializeToString(fragment);
return innerXML;
}
|