我用了<script type="text/javascript">function exportExcel() {var sHtml = htmlEncode($("#mystamp")[0].outerHTML);//做html编码$("input[name='hHtml']").val(sHtml);//表单提交 $("form[name='myForm']").submit();}function htmlEncode(value) {//create a in-memory div, set it's inner text(which jQuery automatically encodes) //then grab the encoded contents back out. The div never exists on the page. return $('<div/>').text(value).html();}</script> 这种方式生成word,但是生成出来的没有样式,求助啊!!!
- 2 回答
- 0 关注
- 1406 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消