var EventsListener=function(){ var uniqid=-1,obj={}; //添加监听 var listen=function(key,fn){ obj[key]?'':obj[key]=[]; var tagid=(++uniqid).toString(); obj[key].push({ id:tagid, fn:fn }); return tagid; }; //发布 var publish=function(){ var key=Array.prototype.shift.call(arguments); if(obj[key]&&obj[key].length){ for(var i=0;i