最終更新:2017-12-21 (木) 03:27:56 (26d)  

localStorage はてなブックマークを見る
Top / localStorage

localStorage['key'] = 'value';
var value = localStorage['key'];
delete localStorage['key'];
localStorage.clear();

//以下は同じ意味。
localStorage.setItem("foo","bar");
localStorage.foo = "bar";
localStorage[foo] = "bar";

メソッド

  • getItem
  • setItem
  • removeItem
  • clear

容量

関連

参考