history.state无法在Chrome中运行

时间:2012-05-15 17:10:51

标签: javascript

The following code works in FF but not in Chrome:

history.replaceState({ obj: 'pushed on' }, 'unused', '');

alert(history.state.obj);

有没有办法让history.state在Chrome中运行?

1 个答案:

答案 0 :(得分:2)

希望这会对您有所帮助:History.js