如何使用本地存储来存储多个变量的值?

San*_*ooj 5 javascript html5

如何使用本地存储来存储多个变量的值?本地存储是否有任何限制.所有浏览器目前支持本地存储?

NBK*_*NBK 7

以下是关于HTML5本地存储的一个很好的讨论 限制了子域的HTML5 localStorage大小限制

关于浏览器,这是一个列表,

Firefox 3.5, Safari 4, IE8, Chrome 4+: HTML5 localStorage; these modern browsers all support the core localStorage functionality defined in the HTML5 draft.

Firefox 2.x and 3.0: Gecko globalStorage, a very early implementation similar to HTML5’s localStorage.

Safari 3.1 & 3.2: HTML5 Database Storage, because Safari 3.1 and 3.2 don’t support HTML5 localStorage.

IE6, IE7: userData persistence, a rarely used IE feature for associating string data with an element on a web page and persisting it between pageviews.

Google Chrome Pre 4: Gears Database API, which is built into earlier versions of Chrome and thus doesn’t require a separate install.
Run Code Online (Sandbox Code Playgroud)

以下是支持此功能的浏览器的列表. /sf/ask/83634911/

变量数量没有限制,可以在此处找到使用HTML5本地存储的详细说明