📜  js 本地存储 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:32.759000             🧑  作者: Mango

代码示例6
myStorage = localStorage;

localStorage.setItem('myCat', 'Tom');

var cat = localStorage.getItem('myCat');

localStorage.removeItem('myCat');

localStorage.clear();