HTML 使用button 按钮导出excel

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_39556804/article/details/86537592

HTML页面:

<button  class="gray-button" onclick="exportDta()">
    导出
</button>

js函数:

exportDta = function () {
        var startTime = $("#startTime").val();
        var endTime = $("#endTime").val();
       
        window.location.href = "/export.do?startTime=" + startTime + "&endTime=" + endTime;
    }

参数为页面筛选时间。 

简单省事,几行代码就行了,能够满足要求。

猜你喜欢

转载自blog.csdn.net/weixin_39556804/article/details/86537592
今日推荐