📜  保存到本地存储 - Javascript 代码示例

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

代码示例2
localStorage.setItem('myCat', 'Tom');

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

localStorage.removeItem('myCat');

// Clear all items
localStorage.clear();