zoukankan      html  css  js  c++  java
  • js 导出div 中的类容为 word 文件

    //引入包  

    <script src="/FileSaver.js"></script>
     <script src="/jquery.wordexport.js"></script>

    <button class="layui-btn" lay-filter="save1" id="export">导出文件</button>

    <
    div style="margin: 0 auto;" id="exportdiv" class="Section1"> <div style="margin: 0 auto; 800px;"> <h1>XXXXXX</h1> </div> <div class="layui-form" style="margin: 0 auto; 100%;"> <h2>填表单位盖章:</h2> <table id="msgtable" class="gridtable" style=" 98%"> <tr style="font-size: 20px" > <th colspan="5" rowspan="2" style=" 400px">区域</th> <th colspan="1" rowspan="3" style="height: 100px; 200px">大幅度发</th> <th colspan="5" rowspan="1" style=" 600px">大幅度发</th> </tr> <tr> <th rowspan="2">种植VBVB</th> <th rowspan="2">风格风格的</th> <th rowspan="2">发鬼地方</th> <th rowspan="2">发的过程</th> <th rowspan="2">同仁堂</th> </tr> <tr> </tr> </table> <ul id="textmsg"> <li style="margin-left: 0px"><h2>填表人:</h2></li> <li><h2>联系方式:</h2></li> <li><h2>填表时间:</h2></li> </ul> </div> </div>

    //js  代码 
    $("#export").off().on("click", function() { $("#exportdiv").wordExport(); })
  • 相关阅读:
    Git Revert用法
    C语言------数据输入、输出函数
    C语言------运算符和表达式
    jsp九大内置对象
    三层结构下的多表查询,实体类写法
    String类型中"=="和"equals"的区别
    创建对象数组,给数组赋值(两种理解思路)
    Vbs整人代码
    设计模式之单例
    事务
  • 原文地址:https://www.cnblogs.com/yydown/p/14111964.html
Copyright © 2011-2022 走看看