setCSSEffects: function(A) { this.cssEffects = !! A }, /*Zero Clipboard 提供了一些事件,你可以自定义函数处理这些事件。 Zero Clipboard 事件处理函数为 addEventListener(); 例如当 Flash 完全载入后会触发一个事件 "load" clip.addEventListener( "load", function(client) { alert("Flash 加载完毕!"); });*/ receiveEvent: function(D, E) { D = D.toString().toLowerCase().replace(/^on/, ""); switch (D) { case "load": this.movie = document.getElementById(this.movieId); if (!this.movie) { var C = this; setTimeout(function() { C.receiveEvent("load", null) }, 1); return } if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { var C = this; setTimeout(function() { C.receiveEvent("load", null) }, 100); this.ready = true; return } this.ready = true; this.movie.setText(this.clipText); this.movie.setHandCursor(this.handCursorEnabled); break; case "mouseover": if (this.domElement && this.cssEffects) { this.domElement.addClass("hover"); if (this.recoverActive) { this.domElement.addClass("active") } } break; case "mouseout": if (this.domElement && this.cssEffects) { this.recoverActive = false; if (this.domElement.hasClass("active")) { this.domElement.removeClass("active"); this.recoverActive = true } this.domElement.removeClass("hover") } break; case "mousedown": if (this.domElement && this.cssEffects) { this.domElement.addClass("active") } break; case "mouseup": if (this.domElement && this.cssEffects) { this.domElement.removeClass("active"); this.recoverActive = false } break } if (this.handlers[D]) { for (var B = 0, A = this.handlers[D].length; B < A; B++) { var F = this.handlers[D][B]; if (typeof(F) == "function") { F(this, E) } else { if ((typeof(F) == "object") && (F.length == 2)) { F[0][F[1]](this, E) } else { if (typeof(F) == "string") { window[F](this, E) } } } } } } };
以上所述是小编给大家介绍的Javascript复制实例详解,希望对大家有所帮助。
您可能感兴趣的文章: