var OpenWindow = window.open("");
OpenWindow.document.write("<HTML>");
OpenWindow.document.write("<HEAD>");
OpenWindow.document.write("<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/>");
OpenWindow.document.write("<TITLE><\/TITLE>");
OpenWindow.document.write("<\/HEAD>");
OpenWindow.document.write(html);
OpenWindow.document.write();
OpenWindow.document.write("<\/BODY>");
OpenWindow.document.write("<\/HTML>");
OpenWindow.print();
html 拼自己的页面代码就行了