版权声明:本文为博主原创文章,未经博主允许不得转载。 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;
}
参数为页面筛选时间。
简单省事,几行代码就行了,能够满足要求。