記錄一下,方便日后使用,如果有人發現有什么不對的地方,請多多指教
if (window.history && window.history.pushState) { $(window).on('popstate', function () { window.history.pushState('forward', null, '#'); window.history.forward(1); });}window.history.pushState('forward', null, '#'); //在IE中必須得有這兩行window.history.forward(1);window.history.forward(1); // 原理就是產生一個“前進”的動作,以抵消后退功能
新聞熱點
疑難解答