node.js传值

//传值
    //1、 
    module.exports.name = "aaa";
   //2、
    exports.name = "bbb";
    //3、可以多个传值
    module.exports=
        {
            name:"zhangsan"
        }
    //另一个js接收传值
    let comml = require("路径");
    alert(comml.name);

 

posted @ 2018-05-28 15:34  纡ゾ少︶ㄣ  阅读(139)  评论(0编辑  收藏  举报