Tuesday, 27 August 2013

Storing a javascript object in HTML5 local storage

Storing a javascript object in HTML5 local storage

I want to store a JavaScript object in HTML5 local storage.
sessionStorage.setItem("localObj",this);
I am using the above statement within a function.The object contains HTML
tags. I can neither convert it to a string nor to a JSON. How do i proceed
with this?

No comments:

Post a Comment