使用更改的URL加载局部视图

问题描述 投票:0回答:1

如何单击按钮,页面将部分视图和URL从'/user/account/payment'加载到'/user/account/profile',而不刷新网页。

对于我来说,局部视图将仅使用jquery$('class').load('partial page'),但不会更改URL。

示例网站,例如https://shopee.com.my/帐户页面。

jquery .net-core
1个回答
0
投票

尝试此方法

$.ajax({
//some jquery ajax call properties
success: function(){
    location.hash = 'your_value';
}
})
© www.soinside.com 2019 - 2024. All rights reserved.