标签:event UI node cti new log events function nts
var events = require(‘events‘);
var eventEmitter=new events.EventEmitter();
eventEmitter.on(‘speak‘,function (msg) {
console.log(msg+‘: speak‘);
})
eventEmitter.emit(‘speak‘,‘huchao‘);
标签:event UI node cti new log events function nts
原文地址:http://www.cnblogs.com/huchaoheng/p/7770516.html