📜  如何在本地存储js中存储和获取单个变量 - Javascript代码示例

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

代码示例1
var userName = "SHAM3R";
//store
localStorage.setItem("storeUserName", userName);
//get
let getUserName = localStorage.getItem("storeUserName");