javascript - 有没有办法在 index.html 中包含所有外部 js 文件和脚本标签
问题描述
我想包含所有保存在 index.html 中某个文件夹中的 .js 文件。有没有办法在一个脚本标签中导入所有 .js 文件。就像我们用 * 导入包中的所有类一样
src
Controller
| HomeController.js
| LoginController.js
| AboutController.js
Directive
Services
Views
index.html
索引.html
<html>
<head>
<script src='Controller/*.js'>
</head>
<body>
</body>
</html>
我们可以在 index.html 中包含所有带有一个脚本标记的 .js 文件吗?
或者
有没有其他方法可以动态包含这些所有 js 文件?
解决方案
推荐阅读
- c++ - C++ 模板参数包自动将 & 添加到其参数
- javascript - JavaScript 未加载到 HTML 文件中
- c# - 无法为外部 dll 加载文件或程序集
- java - 如何将 .wav 文件转换为浮点数组(编辑浮点数组,例如添加两个信号)并返回到没有白噪声的 .wav 文件
- android - com.android.builder.merge.DuplicateRelativeFileException: 发现多个文件与操作系统无关的路径 'META-INF/INDEX.LIST'
- tcl - NS2 代码为什么这不起作用?(模拟程序未运行) 25 个节点
- flutter - 如何在弹出窗口颤动中创建按钮列表
- wpf - 键入 XAML 时如何将插入符号移到结束引号之后?
- css - Media query properties being overwriiten by other breakpoints
- javascript - Javascript 如何删除日元/日元符号