?? fe.js
字號:
if(!(typeof (Fe)=="object"&&Fe&&Fe.version)){var Fe={version:"20080809",emptyFn:function(){}}}Fe.isArray=function(A){return A&&typeof (A)=="object"&&A.constructor==Array};Fe.isObject=function(A){return(A&&(typeof (A)=="object"||typeof (A)=="function"))||false};Fe.trim=function(A){return A.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};Fe.format=function(H,J){if(arguments.length>1){var E=Fe.format,G=/([.*+?^=!:${}()|[\]\/\\])/g,F=(E.left_delimiter||"{").replace(G,"\\$1"),A=(E.right_delimiter||"}").replace(G,"\\$1");var C=E._r1||(E._r1=new RegExp("#"+F+"([^"+F+A+"]+)"+A,"g")),B=E._r2||(E._r2=new RegExp("#"+F+"(\\d+)"+A,"g"));if(typeof (J)=="object"){return H.replace(C,function(K,M){var L=J[M];if(typeof L=="function"){L=L(M)}return typeof (L)=="undefined"?"":L})}else{if(typeof (J)!="undefined"){var I=Array.prototype.slice.call(arguments,1);var D=I.length;return H.replace(B,function(K,L){L=parseInt(L,10);return(L>=D)?K:I[L]})}}}return H};Fe.format.delimiter=function(C,A){var B=Fe.format;B.left_delimiter=C||"{";B.right_delimiter=A||C||"}";B._r1=B._r2=null};Fe.each=function(E,A){if(E){if(E.length==undefined){for(var B in E){A.call(E[B],E[B],B)}}else{for(var C=0,D=E.length;C<D;C++){A.call(E[C],E[C],C)}}}return E};Fe.extend=function(D,A,C){if(C){Fe.extend(D,C)}if(D&&A&&typeof (A)=="object"){for(var B in A){D[B]=A[B]}}return D};Fe.extend(Fe,(function(){var D=navigator.userAgent;var E=0,C=0,A=0,F=0,G=0,B=0;if(D.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(D)){E=RegExp.$1}if(window.opera&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(D)){A=RegExp.$2}if(D.indexOf("Gecko")>-1&&D.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(D)){G=RegExp.$1}if(/MSIE (\d+(\.\d+)?)/.test(D)){F=RegExp.$1}if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(D)){B=RegExp.$2}if(D.indexOf("KHTML")>-1&&/AppleWebKit\/([^\s]*)/.test(D)){C=RegExp.$1}return({isStrict:document.compatMode=="CSS1Compat",isSafari:E,isWebkit:C,isOpera:A,isGecko:G,isIE:F,isFF:B})})());Fe.G=function(){for(var A=[],B=arguments.length-1;B>-1;B--){var C=arguments[B];A[B]=null;if(typeof (C)=="object"&&C&&C.dom){A[B]=C.dom}else{if((typeof (C)=="object"&&C&&C.tagName)||C==window||C==document){A[B]=C}else{if(typeof (C)=="string"&&(C=document.getElementById(C))){A[B]=C}}}}return A.length<2?A[0]:A};Fe.Q=function(E,D,B){if(typeof E!="string"||E.length<=0){return null}var I=[],B=(typeof B=="string"&&B.length>0)?B.toLowerCase():null,C=(Fe.G(D)||document);if(C.getElementsByClassName){Fe.each(C.getElementsByClassName(E),function(J){if(B!=null){if(J.tagName.toLowerCase()==B){I[I.length]=J}}else{I[I.length]=J}})}else{E=E.replace(/\-/g,"\\-");var A=new RegExp("(^|\\s{1,})"+Fe.trim(E)+"(\\s{1,}|$)"),G=(B==null)?(C.all?C.all:C.getElementsByTagName("*")):C.getElementsByTagName(B),F=G.length,H=F;while(F--){if(A.test(G[H-F-1].className)){I[I.length]=G[H-F-1]}}}return I};Fe.hide=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display="none"}})};Fe.show=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display=""}})};Fe.toggle=function(){Fe.each(arguments,function(A){if(A=Fe.G(A)){A.style.display=A.style.display=="none"?"":"none"}})};Fe.addClassName=function(C,D){if(!(C=Fe.G(C))){return }var A=C.className.split(" "),B=Fe.trim;if(!new RegExp("(^|\\s{1,})"+B(D)+"(\\s{1,}|$)").test(C.className)){C.className=B(A.concat(D).join(" "))}};Fe.removeClassName=function(B,C){if(!(B=Fe.G(B))){return }var A=Fe.trim,D=new RegExp("(^|\\s{1,})"+A(C)+"(\\s{1,}|$)","g");B.className=A(B.className.replace(D,"$2"))};Fe.ac=Fe.addClassName;Fe.rc=Fe.removeClassName;Fe.body=function(){var A=0,I=0,E=0,C=0,B=0,J=0;var F=window,D=document,G=D.documentElement;A=G.clientWidth||D.body.clientWidth;I=F.innerHeight||G.clientHeight||D.body.clientHeight;C=D.body.scrollTop||G.scrollTop;E=D.body.scrollLeft||G.scrollLeft;B=Math.max(D.body.scrollWidth,G.scrollWidth||0);J=Math.max(D.body.scrollHeight,G.scrollHeight||0,I);return{scrollTop:C,scrollLeft:E,documentWidth:B,documentHeight:J,viewWidth:A,viewHeight:I}};Fe.on=function(C,B,A){if(!(C=Fe.G(C))){return false}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C[B+A]=function(){A.call(C,window.event)};C.attachEvent("on"+B,C[B+A])}else{C.addEventListener(B,A,false)}};Fe.un=function(C,B,A){if(!(C=Fe.G(C))){return false}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C.detachEvent("on"+B,C[B+A]);C[B+A]=null}else{C.removeEventListener(B,A,false)}};Fe.getStyle=function(B,C){B=Fe.G(B);if(!B||!C){return null}if(C=="float"){C=Fe.isIE?"styleFloat":"cssFloat"}C=C.replace(/(-[a-z])/gi,function(D,E){return E.charAt(1).toUpperCase()});var A=null;if(A=B.style[C]){return A}if(A=B.currentStyle[C]){return A}};if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null)});HTMLElement.prototype.__defineGetter__("children",function(){for(var B=[],C=0,E,D=0,A=this.childNodes.length;D<A;D++){E=this.childNodes[D];if(E.nodeType==1){B[C++]=E;if(E.name){if(!B[E.name]){B[E.name]=[]}B[E.name][B[E.name].length]=E}if(E.id){B[E.id]=E}}}return B});HTMLElement.prototype.insertAdjacentHTML=function(A,B){var C=this.ownerDocument.createRange();C.setStartBefore(this);C=C.createContextualFragment(B);switch(A){case"beforeBegin":this.parentNode.insertBefore(C,this);break;case"afterBegin":this.insertBefore(C,this.firstChild);break;case"beforeEnd":this.appendChild(C);break;case"afterEnd":if(!this.nextSibling){this.parentNode.appendChild(C)}else{this.parentNode.insertBefore(C,this.nextSibling)}break}}}if(!window.console||!console.firebug){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -