index.js
function (oTarget, sEventType, fnHandler) {
  if (oTarget.listeners && oTarget.listeners[sEventType]) {
    var listeners = oTarget.listeners[sEventType];
    for (var i = listeners.length - 1; i >= 0 && fnHandler; i--) {
      if (listeners[i] == fnHandler) {
        listeners.splice(i, 1);
      }
    }
    if ((!listeners.length || !fnHandler) && listeners["_handler"]) {
      oTarget.removeEventListener ? oTarget.removeEventListener(sEventType, listeners["_handler"], false) : oTarget.detachEvent('on' + sEventType, listeners["_handler"]);
      delete oTarget.listeners[sEventType];
    }
  }
}
function (oTarget, sEventType, fnHandler) {
  if (oTarget.listeners && oTarget.listeners[sEventType]) {
    var listeners = oTarget.listeners[sEventType];
    for (var i = listeners.length - 1; i >= 0 && fnHandler; i--) {
      if (listeners[i] == fnHandler) {
        listeners.splice(i, 1);
      }
    }
    if ((!listeners.length || !fnHandler) && listeners["_handler"]) {
      oTarget.removeEventListener ? oTarget.removeEventListener(sEventType, listeners["_handler"], false) : oTarget.detachEvent('on' + sEventType, listeners["_handler"]);
      delete oTarget.listeners[sEventType];
    }
  }
}
/*注销事件
@param {Object} oTarget 对象
@param {String} sEventType 事件类型
@param {Function} fnHandler 事件方法