示例工程 20-network-storage-fetch

20-network-storage-fetch/04-local-storage/index.html

html · 0.3 KB

运行:20 · localStorage 的类型失真

该示例需要 localStorage / IndexedDB / Service Worker,请用「新窗口打开」获得完整能力。

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>20 · localStorage 的类型失真</title>
</head>
<body>
  <p>打开 Console 查看对象存进 localStorage 后变成了什么。</p>
  <script type="module">
    import { run } from './main.js';
    run();
  </script>
</body>
</html>