【发布时间】:2019-07-08 07:29:42
【问题描述】:
我有一个搜索表单,我想在用户点击过滤而不刷新页面时更改项目。
我用这个jquery
var newUrl = "store/productlist?" + queryString;
window.history.pushState(null, null, newUrl);
$('#loadingModal').modal('show');
$.ajax({
url: newUrl,
type: "GET",
dataType: "html",
success: function (result) {
$("#ProductsPartialView").append(data);
$('#loadingModal').modal('hide');
}
});
和店内控制器。
public async Task<ActionResult> Productlist(string category, string factory, string page, string order)
{//get productlist
return PartialView("_ProductsPartialView", product);}
但不要采取行动。
【问题讨论】:
-
浏览器的控制台有什么错误吗?
-
不,没有任何错误。
标签: jquery asp.net-mvc model-view-controller