js导出html为word的方法
getquestion:function(){
require(['backend/FileSaver'], function(){
require(['backend/jquery.wordexport'], function(){
var sjname=$('#sjname').html()
$(".jquery-word-export").click(function(event) {
$("#pagecontent").wordExport(sjname);
});})
});
},
引入FileSaver,再使用jquery.wordexport,html布局如下
2020年7月29日阜阳市颍泉区幼儿教师招聘
导出成word
如何格式化html文档呢?比如页眉页脚,页边距,分页等等
标签:function,sjname,word,导出,js,jquery,html
来源: https://www.cnblogs.com/cn-oldboy/p/13611545.html