本帖最后由 东北老哥谈JAVA 于 2023-2-28 16:37 编辑
- xport function fun(){
- console.log("fun1")
- }
- export let person = {
- name:"devin",
- age:12
- }
复制代码- let a = 12
- let fun = function(){
- console.log("function")
- }
- export default{
- a,fun
- }
复制代码- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Titletitle>
- head>
- <body>
- <script type="module" >
- // import * as util from './a.js';
- // //import {fun, person} from "./a.js";
- // console.log(util.fun(),util.person)
- // import a from './exportDefault';
- // a.show();
- // console.log(a.a);
- // import * as util from "./b.js"
- import c from "./c.js"
- // console.log(util.fun)
- console.log(c.a)
- c.fun()
-
- script>
- body>
- html>
复制代码
|