导出字符串拼接jquery
Posted lovealine
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了导出字符串拼接jquery相关的知识,希望对你有一定的参考价值。
$(".rExport").click(function () {
var exportStr = "pageSize=" + $scope.pageSize + "&pageNum=" + $scope.pageNum;
if ($scope.taskName !== "") {
exportStr += "&taskName=" + $scope.taskName;
}
if ($("#data_three").val() !== "") {
var timeStr = $("#data_three").val().split(" - ");
var effecttime = timeStr[0];
var endtime = timeStr[1];
exportStr += "&launchTime=" + effecttime + "&launchedTimeOut=" + endtime;
}
if ($scope.taskType !== -1) {
exportStr += "&taskType=" + $scope.taskType;
}
if ($scope.needAudited !== -1) {
exportStr += "&needAudited=" + $scope.needAudited;
}
window.location.href = "/Excel?" + exportStr;
})
以上是关于导出字符串拼接jquery的主要内容,如果未能解决你的问题,请参考以下文章