为此,您可以在HTML5中使用本地存储。本地存储专为跨多个窗口且持续时间超出当前会话的存储而设计。特别是,出于性能方面的考虑,Web应用程序可能希望在客户端存储兆字节的用户数据,例如整个用户编写的文档或用户的邮箱。
<!DOCTYPE HTML> <html> <body> <script> if( localStorage.hits ){ localStorage.hits = Number(localStorage.hits) +1; } else{ localStorage.hits = 1; } document.write("总命中:" + localStorage.hits ); </script> <p>Refresh the page to increase number of hits.</p> <p>Close the window and open it again and check the result.</p> </body> </html
热门文章
- 宠物领养活动宣传语(宠物领养活动方案)
- 合肥宠物猫领养中心电话(合肥宠物猫领养中心电话地址)
- springboot集成swagger报404问题
- 乍得VPN | 3月9日20.7M/S|免费SSR/Clash/Shadowrocket/V2ray免费节点订阅分享
- 乍得VPN | 3月20日19.7M/S|免费SSR/Clash/Shadowrocket/V2ray免费节点订阅分享
- 乍得VPN | 4月11日18.3M/S|免费V2ray/Clash/SSR/Shadowrocket免费节点订阅分享
- 乍得VPN | 3月19日22.4M/S|免费V2ray/Shadowrocket/SSR/Clash免费节点订阅分享
- 开宠物用品店需要具备哪些条件(开宠物用品店怎么样)
- 农大宠物医院是公立的吗(农大宠物医院医生简介)
- 解决antdv的table因数据量过大导致的卡顿问题