赞
踩
ajax传参方式无法下载文件,所以使用表单提交方式下载
<div class="layui-col-sm12 layui-col-md6"> <div class="layui-card"> <div class="layui-card-header">识别文字<button id="createWord" class="layui-btn" style="float: right;" >生成word</button> </div> <div class="layui-card-body text-center" style="padding: 0px 20px 10px 20px;"> <div class="div-item" style="height:420px;margin-top:30px;position: relative;"> <div id="text" class="text" style="height:420px;overflow-y:auto;" ></div> </div> </div> </div> </div> $("#createWord").click(function () { var content = $('#text').text()