js导出html页面到word中时,常遇到这个错误
jQuery Word Export: missing dependency (FileSaver.js)
原因是jquery.wordexport.js需要依赖FileSaver.js,而html页面是顺序加载的,所以在html页面中引入这两个文件时,一定要先引入FileSaver.js,再引入jquery.wordexport.js
像这样
<script src="/js/FileSaver.js"></script>
<script src="/js/jquery.wordexport.js"></script>