版权声明:Follow your heart and intuition. https://blog.csdn.net/qq_35246620/article/details/82849331
首先,抛出一个问题:
- 用 AJAX 向后端发生请求的时候,其中的一个参数为
new Date()
,问是否能成功发送请求?
<script>
// 设置超时时间
setTimeout(function () {
var tradeDate = new Date();
$.ajax({
url: "${path}/app/trade/queryTradeCount",
type: "POST",
data: {
tradeDate: tradeDate
},
dataType: "JSON",
async: "true",
success: function (data) {
alert("请求成功");
},
error: function (data) {
alert("请求失败");
}
});
}, 80);
</script>
示例代码如上所示,待续……囧!