我用了<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,但是生成出來的沒有樣式,求助?。。?!
添加回答
舉報
0/150
提交
取消