求a.attachEvent = function(a, c, d) { a = "ev_" + 什么意思
javascript吧
全部回复
仅看楼主
level 1
棒子法师 楼主
dhtmlxEventable = function(a) {
a.attachEvent = function(a, c, d) {a = "ev_" + a.toLowerCase();
this[a] || (this[a] = new this.eventCatcher(d || this));
return a + ":" + this[a].addEvent(c)};
a.callEvent = function(a, c)
{a = "ev_" + a.toLowerCase();
return this[a] ? this[a].apply(this, c) : !0};
a.checkEvent = function(a) {return !! this["ev_" + a.toLowerCase()]};
a.eventCatcher = function(a) {var c = [],d = function()
{for (var d = !0,g = 0; g < c.length; g++) if (c[g] != null) var f = c[g].apply(a, arguments),d = d && f;return d};
d.addEvent = function(a) {typeof a != "function" && (a = eval(a));
return a ? c.push(a) - 1 : !1};
d.removeEvent = function(a) {c[a] = null};return d};
a.detachEvent = function(a) {if (a != !1) {var c = a.split(":");
this[c[0]].removeEvent(c[1])}};a.detachAllEvents = function() {for (var a in this) a.indexOf("ev_") == 0 && delete this[a]};a = null};
2013年04月22日 11点04分 1
level 1
棒子法师 楼主
很急很急,远文件是dhtmlx的js
2013年04月22日 11点04分 2
1