Return to Snippet

Revision: 48711
at July 8, 2011 00:33 by devnull69


Initial Code
function htmltocontext(source)
{
  var dt = document.implementation.createDocumentType("html", "-//W3C//DTD HTML 4.01 Transitional//EN", "http://www.w3.org/TR/html4/loose.dtd");
  var doc = document.implementation.createDocument('','', dt);
  var html = doc.createElement('html');
  html.innerHTML = source;
  doc.appendChild(html);
  return doc;
}

Initial URL

                                

Initial Description

                                

Initial Title
Ajax HTML to document

Initial Tags
ajax

Initial Language
JavaScript