首页 > 技术文章 > wordexport 插件生成word报告

1234cjq 2017-02-25 11:28 原文

导入wordexport插件

<script src="${ctx }/static/js/jquery.wordexport.js"
type="text/javascript"></script>
<script src="${ctx }/static/js/FileSaver.js" type="text/javascript"></script>

jq方法使用

jQuery(document).ready(function($) {
$("a.jquery-word-source").click(function(event) {   //添加点击事件
$("#sourceamodel").wordExport();    //事件来源id
});  
});

数据来源

<div class="row" id="sourceamodel">

</div>

推荐阅读