js保存指定html

function save_record(filename, content) {
 //打开新窗口保存
 var winRecord = window.open('about:blank', '_blank', 'top=500');
 winRecord.document.open("text/html", "utf-8");
 winRecord.document.write(" 
" + content + "
"); winRecord.document.execCommand("SaveAs", true, filename + ".html"); winRecord.close(); }

 

你可能感兴趣的:(js保存指定html)