标签:nodejs
var events = require('events'); var emitter = new events.EventEmitter(); emitter.on("event1",function (message) { console.log(message); }); emitter.emit('event1',"I am message");
标签:nodejs
原文地址:http://blog.csdn.net/rainlesvio/article/details/41563021