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>