在引入jquery.min.js前加

1
<script>if (typeof module === 'object') { window.module = module; module = undefined; }</script>

在引入全部js文件之后加

1
<script>if (window.module) module = window.module;</script>

例:

1
2
3
4
5
6
7
 <script>if (typeof module === 'object') { window.module = module; module = undefined; }</script>

<script src="res/js/jquery-2.1.1.min.js "></script>
<script src="res/js/materialize.min.js "></script>

<script src="heapsort.js "></script>
<script>if (window.module) module = window.module;</script>

Leave a comment

电子邮件地址不会被公开。 必填项已用*标注