📜  vanila javascript代码示例中的本地存储

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

代码示例1
// Store data
var someData = 'The data that I want to store for later.';
localStorage.setItem('myDataKey', someData);

// Get data
var data = localStorage.getItem('myDataKey');

// Remove data
localStorage.removeItem('myDatakey');