项目描述
上传时间
浏览人数
<script> let h = "hanlu"; localStorage.setItem("hh",h); let titles = [ "第一个标题","第二个标题","第三个标题","第四个标题","第五个标题" ] //数组 let stu = { name:"jn", age:"24",
// let m =JSON.stringify(jn);
// sessionStorage.setItem("jn",m);
// };
// let zifu = JSON.stringify(titles); //转换字符串
// localStorage.setItem("titles",zifu);
// localStorage.removeItem("h"); //删除某一项
// console.log(localStorage.length ); //取到个数
//
// console.log(localStorage.key(1)); //取到第几项的key
// console.log(JSON.parse(w));
localStorage.setItem("y",h)
let ip = localStorage.getItem("y");
console.log(ip);
加油?