今天用原生js写,想要引入另一个js文件的函数,结果报错
"Uncaught SyntaxError: Cannot use import statement outside a module" when importing ECMAScript 6
解决方法:
sciprt标签加上module
<script type="module" src="milsymbol-2.0.0/src/milsymbol.js"></script>
今天用原生js写,想要引入另一个js文件的函数,结果报错
"Uncaught SyntaxError: Cannot use import statement outside a module" when importing ECMAScript 6
解决方法:
sciprt标签加上module
<script type="module" src="milsymbol-2.0.0/src/milsymbol.js"></script>