Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 更新HTML5历史记录中以前的状态对象_Javascript_Html5 History - Fatal编程技术网

Javascript 更新HTML5历史记录中以前的状态对象

Javascript 更新HTML5历史记录中以前的状态对象,javascript,html5-history,Javascript,Html5 History,在HTML5历史中,我们有replaceState()方法来更新当前历史条目的状态对象 我们是否有类似于previousState()的东西来更新上一个历史记录条目的状态对象?我认为您可以使用history.back()或history.go()进行更新。然后可以使用replaceState()从历史记录中创建新的当前项。replaceState()不用于以前的历史记录

在HTML5历史中,我们有
replaceState()
方法来更新当前历史条目的状态对象


我们是否有类似于
previousState()
的东西来更新上一个历史记录条目的状态对象?

我认为您可以使用history.back()或history.go()进行更新。然后可以使用replaceState()从历史记录中创建新的当前项。replaceState()不用于以前的历史记录