jQuery Word Export: missing dependency (FileSaver.js)

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>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章