我正在尝试像这样更改网址(http://www.rangde.org/gift-cards?theme=Anniversary)
但我得到的输出是(http://www.rangde.org/gift-cards/ ?theme=Anniversary)
我不希望问号参数前面的正斜杠请帮我解决这个问题
我的脚本在这里:
History.pushState({state:1,rand:Math.random()}, 'Designs', '?theme=Diwali');
function(){
var History = window.History, // Note: We are using a capital H instead of a lower h
State = History.getState(),
$log = $('#log');
History.log('initial:', State.data, State.title, State.url);
History.Adapter.bind(window,'statechange',function(){ // Note: We are using statechange instead of popstate
var State = History.getState(); // Note: We are using History.getState() instead of event.state
History.log('statechange:', State.data, State.title, State.url);
});
}