var replaceCurUrl = function(newUrl, title){
var stateObject = {};
history.replaceState(stateObject, title, newUrl);
};
可结合追加或替换URL参数值使用

此时地址栏若是有curuserid,则会替换,否则会追加;code也是如此。
var replaceCurUrl = function(newUrl, title){
var stateObject = {};
history.replaceState(stateObject, title, newUrl);
};
可结合追加或替换URL参数值使用
此时地址栏若是有curuserid,则会替换,否则会追加;code也是如此。
本文标题:无刷新修改URL
本文链接:https://www.haomeiwen.com/subject/xffjdxtx.html
网友评论