你可以用 window.open 出一个空白的页面, 将要保存的数据 document.write 到这个新页面里去, 然后再调用:
<input type=button value=保存 onclick="document.execCommand('SaveAs')">
<input type=button value=另存为 onclick="document.execCommand('Saveas',false,'c:\\test.htm')">保存这个新页面(记着在保存操作完毕后关闭这个新页面)
<input type=button value=保存 onclick="document.execCommand('SaveAs')">
<input type=button value=另存为 onclick="document.execCommand('Saveas',false,'c:\\test.htm')">保存这个新页面(记着在保存操作完毕后关闭这个新页面)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货