代碼如下:$(function() {
$('a').bind('click', function() { var actionObj = $(this); var actionText = actionObj.text(); var stateObj = {
title : actionText,
url : actionObj.attr('href'),
msg : actionText
}; window.history.pushState(stateObj, actionObj, actionObj.attr('href'));
}); window.onpopstate = function(e) { console.log(e.state);
};
})chrome 或者 firefox 都不行……不知道哪里做錯了……
查了一些資料,還是完全不知道問題在哪里……
一只斗牛犬
2023-04-05 16:13:23