示例工程 17-pre-module-globals

17-pre-module-globals/03-script-order/index.html

html · 0.5 KB

运行:17 · script-order

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

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>17 · script-order</title>
</head>
<body>
<p>请打开开发者工具 Console 查看输出(会先出现一个 ReferenceError,见 README)。</p>
<script src="./scripts/user.js"></script>
<script src="./scripts/dep.js"></script>
<script type="module">
  import { run } from './dist/main.js';
  run();
</script>
</body>
</html>