HTML5 学习笔记: localStorage/sessionStorage

Categories: FrontEndHTML5; Tagged with: ; @ March 17th, 2012 19:17

HTML5新增的功能之一: 本地存储. 类似于Flex 的SharedObject.

localStorage.userName = data;  // Save data
var lastName = localStorage.userName; // Get data from local sotrage

image

>>Demo及代码<<

ref: http://www.w3schools.com/html5/html5_webstorage.asp

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.