<!DOCTYPE html>function createDoc()··{··var doc=document.open("text/html","replace");··var txt="<!DOCTYPE html><html><body>Learning about the HTML DOM is fun!</body></html>";··doc.write(txt);··doc.close();··}type="button" value="New document" onclick="createDoc()"