在HTML文件中用import引入js模块

简介<script type="module">     import {tu} from './js/toolUtils.js'     console.log(tu) </script> js中的模块化:https://www.cnblogs.com/Yellow-ice/p/10639029.html

<script type="module">
    import {tu} from './js/toolUtils.js'
    console.log(tu)

</script>


js中的模块化:https://www.cnblogs.com/Yellow-ice/p/10639029.html


本文转自:https://www.cnblogs.com/Yellow-ice/p/10639029.html