导出 module.exports = { obj:obj // 希望将exports这个对象给别人用 } 引入 var a = require("./zs.js") 例1: 注意: 1.导出还有其他两种写法: module.exports = {键:值} module.exports.键 = 值 exports.键 = 值 相关文章: