1.H5的本地存储
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <!-- h5的本地存储 1 会话存储 sessionStorage 浏览器关闭了数据就不存在了 2 永久存储 localStorage 永远存在,除非用户手动删除 localStorage.setItem("key","value") localStorage.getItem("key") localStorage.removeItem("key") localStorage.clear(); -->