Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

state

The state property of the History object returns the current state object, if a state object is set.

Syntaxhistory.state
var data = { data1:"abc", data2:"def", data3:"ghi" }; history.pushState(data , "short title", "?id=1"); alert( history.state.data1 );

JavaScript

Properties

bodycalleeclosedcookiedocumentdropEffecteffectAllowedfilesframeElementframeshistoryInfinityinnerHeightinnerHTMLinnerWidthlengthlocationlocationbarnameNaNnavigatornullopenerouterHeightparentprototypescreenstatetextContentundefined