示例工程 20-network-storage-fetch

20-network-storage-fetch/01-fetch-status/index.html

html · 0.3 KB

运行:20 · fetch 与 4xx

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

<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>20 · fetch 与 4xx</title>
</head>
<body>
  <p>打开 Console:404 不会抛异常,只会得到一个 ok=false 的响应。</p>
  <script type="module">
    import { run } from './main.js';
    run();
  </script>
</body>
</html>