檢查AJAX調用波紋管。問題是AJAX後沒有發送數據到我的方法「/ CategoryResearch /搜索」。根據我的支票,我沒有看到任何錯誤。jQuery AJAX調用不起作用
如果您發現任何問題,請讓我知道。
在此先感謝
<script>
$(document).ready(function() {
var _OperationName = "";
var _calltype = "";
var _page = "";
var _keywords = "";
var _type = "";
var _location = "";
var _condition = "";
var _min = "";
var _max = "";
var _negative = "";
var _minFeedback = "";
var _maxFeedback = "";
var _drange = "";
var _categoryId = "";
$(".SearchMainCategory, .SearchSubCategory").click(function() {
_categoryId = $(this).find("#SearchLevel1CatId").val();
if (typeof _categoryId === "undefined") {
_categoryId = $(this).find("#SearchLevel2CatId").val();
}
_OperationName = "findItemsByCategory";
_calltype = "categoryClick";
_page = 1;
$.post("/CategoryResearch/Search",
{
OperationName: _OperationName,
calltype: _calltype,
page: _page,
keywords: _keywords,
type: _type,
location: _location,
condition: _condition,
min: _min,
max: _max,
negative: _negative,
minFeedback: _minFeedback,
maxFeedback: _maxFeedback,
drange: _drange,
categoryId: _categoryId
},
StartLoading())
.done(function (data) {});
});
});
</script>
打開瀏覽器控制檯,並嘗試跟蹤在網絡選項卡 –
https://ibb.co/imy1Dw請求看到這個錯誤上來就控制檯 –
嘗試檢查您的瀏覽器控制檯,而運行你的代碼片段。它會告訴你錯誤(如果有的話) –