请问这段JS代码什么意思??说是舌签构造函数

/* ========== 舌签构造函数 begin ========== */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('r z=1g.1h.1i("1j")!=-1?I:9;s 6(h,j,k,l,m){5.1k="1.0";5.1l="1m";5.t=6.$(h);7(5.t==q){J B K("6(x)参数错误:x 对像存在!")};7(!6.u){6.u=B 1n()};5.x=6.u.v;6.u.17(5);5.1o=9;5.8=[];5.R=k==q?0:k;5.L=5.R;5.S=l==q?"1p":l;5.T=m==q?"":m;5.M=9;r n=U("6.u["+5.x+"].M = I");r o=U("6.u["+5.x+"].M = 9");7(z){5.t.C("V",n)}w{5.t.D("W",n,9)};7(z){5.t.C("X",o)}w{5.t.D("Y",o,9)};7(Z(j)!="1q"){j="1r"};j=j.1s();1t(j){N"V":5.y="W";E;N"X":5.y="Y";E;N"1u":5.y="1v";E;N"1w":5.y="1x";E;1y:5.y="1z"};5.18=s(a,b,c,d,e){7(6.$(a)==q){J B K("18(19)参数错误:19 对像存在!")};r f=5.8.v;7(c==""){c=q};5.8.17([a,b,c,d,e]);r g=U(\'6.u[\'+5.x+\'].F(\'+f+\')\');7(z){6.$(a).C("1A"+5.y,g)}w{6.$(a).D(5.y,g,9)};7(f==5.R){6.$(a).O=5.S;7(6.$(b)){6.$(b).A.P=""};7(c!=q){5.t.A.1a=c};7(d!=q){G(d)}}w{6.$(a).O=5.T;7(6.$(b)){6.$(b).A.P="1b"}};7(6.$(b)){7(z){6.$(b).C("V",n)}w{6.$(b).D("W",n,9)};7(z){6.$(b).C("X",o)}w{6.$(b).D("Y",o,9)}}};5.F=s(a){7(Z(a)!="10"){J B K("F(1c)参数错误:1c 不是 10 类型!")};r i;11(i=0;i<5.8.v;i++){7(i==a){6.$(5.8[i][0]).O=5.S;7(6.$(5.8[i][1])){6.$(5.8[i][1]).A.P=""};7(5.8[i][2]!=q){5.t.A.1a=5.8[i][2]};7(5.8[i][3]!=q){G(5.8[i][3])}}w 7(5.L==i){6.$(5.8[i][0]).O=5.T;7(6.$(5.8[i][1])){6.$(5.8[i][1]).A.P="1b"};7(5.8[i][4]!=q){G(5.8[i][4])}}};5.L=a};5.12=s(){7(H.v!=5.8.v){J B K("12()参数错误:参数数量与标签数量不符!")};r a=0,i;11(i=0;i<H.v;i++){a+=H[i]};r b=1B.12(),13=0;11(i=0;i<H.v;i++){13+=H[i]/a;7(b<13){5.F(i);E}}};5.Q=9;r p=q;5.14=1C;5.1D=s(a){7(Z(a)=="10"){5.14=a};1d(p);p=1E("6.u["+5.x+"].1e()",5.14);5.Q=I};5.1e=s(){7(5.Q==9||5.M==I){15};r a=5.L;a++;7(a>=5.8.v){a=0};5.F(a)};5.1F=s(){1d(p);5.Q=9}};6.$=s(a){7(16.1f){15 G(\'16.1f("\'+a+\'")\')}w{15 G(\'16.1G.\'+a)}}',62,105,'|||||this|SubShowClass|if|label|false|||||||||||||||||null|var|function|parentObj|childs|length|else|ID|eventType|isIE|style|new|attachEvent|addEventListener|break|select|eval|arguments|true|throw|Error|selectedIndex|mouseIn|case|className|display|autoPlay|defaultID|openClassName|closeClassName|Function|onmouseover|mouseover|onmouseout|mouseout|typeof|number|for|random|percent|spaceTime|return|document|push|addLabel|labelID|background|none|num|clearInterval|nextLabel|getElementById|navigator|appVersion|indexOf|MSIE|version|author|mengjia|Array|lock|selected|string|onmousedown|toLowerCase|switch|onclick|click|onmouseup|mouseup|default|mousedown|on|Math|5000|play|setInterval|stop|all'.split('|'),0,{}))
/* ========== 舌签构造函数 end ========== */
我想看到容易理解的代码。这个是不是加密了??谁帮解下。或者这个怎么理解?

第1个回答  推荐于2016-05-17
解压并对部分函数做了解释

/* ========== 舌签构造函数 begin ========== */

var isIE = navigator.appVersion.indexOf("MSIE") != -1 ? true: false;
function SubShowClass(h, j, k, l, m) {//主函数 h-舌簧的id名程;j-设置响应类型:有五种状态响应onmouseover、onmouseout、click、mouseup、mousedown;k、l、m-默认选中容器(div)的索引序号、默认选中、关闭容器id名称;注意k、l、m都是相对于舌簧tab(h)的子容器
this.version = "1.0";
this.author = "mengjia";
this.parentObj = SubShowClass.$(h);//取得舌簧id
if (this.parentObj == null) {
throw new Error("SubShowClass(ID)参数错误:ID 对像存在!")
};
if (!SubShowClass.childs) {
SubShowClass.childs = new Array()//以下将需开关显示的容器名(div)取得并压入js数组
};
this.ID = SubShowClass.childs.length;
SubShowClass.childs.push(this);
this.lock = false;//以下设置状态参数值
this.label = [];
this.defaultID = k == null ? 0: k;
this.selectedIndex = this.defaultID;
this.openClassName = l == null ? "selected": l;
this.closeClassName = m == null ? "": m;
this.mouseIn = false;
var n = Function("SubShowClass.childs[" + this.ID + "].mouseIn = true");
var o = Function("SubShowClass.childs[" + this.ID + "].mouseIn = false");
if (isIE) {
this.parentObj.attachEvent("onmouseover", n)
} else {
this.parentObj.addEventListener("mouseover", n, false)
};
if (isIE) {
this.parentObj.attachEvent("onmouseout", o)
} else {
this.parentObj.addEventListener("mouseout", o, false)
};
if (typeof(j) != "string") {//以下设置舌簧鼠标响应类型
j = "onmousedown"
};
j = j.toLowerCase();
switch (j) {
case "onmouseover":
this.eventType = "mouseover";
break;
case "onmouseout":
this.eventType = "mouseout";
break;
case "onclick":
this.eventType = "click";
break;
case "onmouseup":
this.eventType = "mouseup";
break;
default:
this.eventType = "mousedown"
};
this.addLabel = function(a, b, c, d, e) {//该函数根据取得的状态显示或关闭子容器并设置tab背景样式(c参数)
if (SubShowClass.$(a) == null) {
throw new Error("addLabel(labelID)参数错误:labelID 对像存在!")
};
var f = this.label.length;
if (c == "") {
c = null
};
this.label.push([a, b, c, d, e]);
var g = Function('SubShowClass.childs[' + this.ID + '].select(' + f + ')');
if (isIE) {
SubShowClass.$(a).attachEvent("on" + this.eventType, g)
} else {
SubShowClass.$(a).addEventListener(this.eventType, g, false)
};
if (f == this.defaultID) {
SubShowClass.$(a).className = this.openClassName;
if (SubShowClass.$(b)) {
SubShowClass.$(b).style.display = ""
};
if (c != null) {
this.parentObj.style.background = c
};
if (d != null) {
eval(d)
}
} else {
SubShowClass.$(a).className = this.closeClassName;
if (SubShowClass.$(b)) {
SubShowClass.$(b).style.display = "none"
}
};
if (SubShowClass.$(b)) {
if (isIE) {
SubShowClass.$(b).attachEvent("onmouseover", n)
} else {
SubShowClass.$(b).addEventListener("mouseover", n, false)
};
if (isIE) {
SubShowClass.$(b).attachEvent("onmouseout", o)
} else {
SubShowClass.$(b).addEventListener("mouseout", o, false)
}
}
};
this.select = function(a) {//调用函数具体设置选中tab状态或样式
if (typeof(a) != "number") {
throw new Error("select(num)参数错误:num 不是 number 类型!")
};
var i;
for (i = 0; i < this.label.length; i++) {
if (i == a) {
SubShowClass.$(this.label[i][0]).className = this.openClassName;
if (SubShowClass.$(this.label[i][1])) {
SubShowClass.$(this.label[i][1]).style.display = ""
};
if (this.label[i][2] != null) {
this.parentObj.style.background = this.label[i][2]
};
if (this.label[i][3] != null) {
eval(this.label[i][3])
}
} else if (this.selectedIndex == i) {
SubShowClass.$(this.label[i][0]).className = this.closeClassName;
if (SubShowClass.$(this.label[i][1])) {
SubShowClass.$(this.label[i][1]).style.display = "none"
};
if (this.label[i][4] != null) {
eval(this.label[i][4])
}
}
};
this.selectedIndex = a
};
this.random = function() {
if (arguments.length != this.label.length) {
throw new Error("random()参数错误:参数数量与标签数量不符!")
};
var a = 0,
i;
for (i = 0; i < arguments.length; i++) {
a += arguments[i]
};
var b = Math.random(),
percent = 0;
for (i = 0; i < arguments.length; i++) {
percent += arguments[i] / a;
if (b < percent) {
this.select(i);
break
}
}
};
this.autoPlay = false;
var p = null;
this.spaceTime = 5000;
this.play = function(a) {
if (typeof(a) == "number") {
this.spaceTime = a
};
clearInterval(p);
p = setInterval("SubShowClass.childs[" + this.ID + "].nextLabel()", this.spaceTime);
this.autoPlay = true
};
this.nextLabel = function() {
if (this.autoPlay == false || this.mouseIn == true) {
return
};
var a = this.selectedIndex;
a++;
if (a >= this.label.length) {
a = 0
};
this.select(a)
};
this.stop = function() {
clearInterval(p);
this.autoPlay = false
}
};
SubShowClass.$ = function(a) {//取得tab h的超链接
if (document.getElementById) {
return eval('document.getElementById("' + a + '")')
} else {
return eval('document.all.' + a)
}
}
/* ========== 舌签构造函数 end ========== */本回答被提问者采纳
第2个回答  2011-02-28
function SubShowClass(h,j,k,l,m){
this.version="1.21";
this.author="mengjia";
this.parentObj=SubShowClass.$(h);
if(this.parentObj==null&&h!="none"){
throw new Error("SubShowClass(ID)\u53c2\u6570\u9519\u8bef:ID \u5bf9\u50cf\u5b58\u5728!(value:"+h+")");
}
if(!SubShowClass.childs){
SubShowClass.childs=[];
}
this.ID=SubShowClass.childs.length;
SubShowClass.childs.push(this);
this.lock=false;
this.label=[];
this.defaultID=k==null?0:k;
this.selectedIndex=this.defaultID;
this.openClassName=l==null?"selected":l;
this.closeClassName=m==null?"":m;
this.mouseIn=false;
var n=Function("SubShowClass.childs["+this.ID+"].mouseIn = true"),mouseOutFunc=Function("SubShowClass.childs["+this.ID+"].mouseIn = false");
if(h!="none"){
if(this.parentObj.attachEvent){
this.parentObj.attachEvent("onmouseover",n);
}else {
this.parentObj.addEventListener("mouseover",n,false);
}
}
if(h!="none"){
if(this.parentObj.attachEvent){
this.parentObj.attachEvent("onmouseout",mouseOutFunc);
}else {
this.parentObj.addEventListener("mouseout",mouseOutFunc,false);
}
}
if(typeof (j)!="string"){
j="onmousedown";
}
j=j.toLowerCase();
switch(j){
case "onmouseover":
this.eventType="mouseover";
break ;
case "onmouseout":
this.eventType="mouseout";
break ;
case "onclick":
this.eventType="click";
break ;
case "onmouseup":
this.eventType="mouseup";
break ;
default:
this.eventType="mousedown";
}
this.addLabel=function(a,b,c,d,e){
if(SubShowClass.$(a)==null&&a!="none"){
throw new Error("addLabel(labelID)\u53c2\u6570\u9519\u8bef:labelID \u5bf9\u50cf\u5b58\u5728!(value:"+a+")");
}
var f=this.label.length;
if(c==""){
c=null;
}
this.label.push([a,b,c,d,e]);
var g=Function("SubShowClass.childs["+this.ID+"].select("+f+")");
if(a!="none"){
if(SubShowClass.$(a).attachEvent){
SubShowClass.$(a).attachEvent("on"+this.eventType,g);
}else {
SubShowClass.$(a).addEventListener(this.eventType,g,false);
}
}
if(f==this.defaultID){
if(a!="none"){
SubShowClass.$(a).className=this.openClassName;
}
if(SubShowClass.$(b)){
SubShowClass.$(b).style.display="";
}
if(h!="none"){
if(c!=null){
this.parentObj.style.background=c;
}
}
if(d!=null){
eval(d);
}
}else {
if(a!="none"){
SubShowClass.$(a).className=this.closeClassName;
}
if(SubShowClass.$(b)){
SubShowClass.$(b).style.display="none";
}
}
if(SubShowClass.$(b)){
if(SubShowClass.$(b).attachEvent){
SubShowClass.$(b).attachEvent("onmouseover",n);
}else {
SubShowClass.$(b).addEventListener("mouseover",n,false);
}
if(SubShowClass.$(b).attachEvent){
SubShowClass.$(b).attachEvent("onmouseout",mouseOutFunc);
}else {
SubShowClass.$(b).addEventListener("mouseout",mouseOutFunc,false);
}
}
};
this.select=function(a,b){
if(typeof (a)!="number"){
throw new Error("select(num)\u53c2\u6570\u9519\u8bef:num \u4e0d\u662f number \u7c7b\u578b!(value:"+a+")");
}
if(b!=true&&this.selectedIndex==a){
return ;
}
var i;
for(i=0;i<this.label.length;i++){
if(i==a){
if(this.label[i][0]!="none"){
SubShowClass.$(this.label[i][0]).className=this.openClassName;
}
if(SubShowClass.$(this.label[i][1])){
SubShowClass.$(this.label[i][1]).style.display="";
}
if(h!="none"){
if(this.label[i][2]!=null){
this.parentObj.style.background=this.label[i][2];
}
}
if(this.label[i][3]!=null){
eval(this.label[i][3]);
}
}else {
if(this.selectedIndex==i||b==true){
if(this.label[i][0]!="none"){
SubShowClass.$(this.label[i][0]).className=this.closeClassName;
}
if(SubShowClass.$(this.label[i][1])){
SubShowClass.$(this.label[i][1]).style.display="none";
}
if(this.label[i][4]!=null){
eval(this.label[i][4]);
}
}
}
}
this.selectedIndex=a;
};
this.random=function(){
if(arguments.length!=this.label.length){
throw new Error("random()\u53c2\u6570\u9519\u8bef:\u53c2\u6570\u6570\u91cf\u4e0e\u6807\u7b7e\u6570\u91cf\u4e0d\u7b26!(length:"+arguments.length+")");
}
var a=0,i;
for(i=0;i<arguments.length;i++){
a+=arguments[i];
}
var b=Math.random(),percent=0;
for(i=0;i<arguments.length;i++){
percent+=arguments[i]/a;
if(b<percent){
this.select(i);
break ;
}
}
};
this.autoPlay=false;
var o=null;
this.spaceTime=5000;
this.play=function(a){
if(typeof (a)=="number"){
this.spaceTime=a;
}
clearInterval(o);
o=setInterval("SubShowClass.childs["+this.ID+"].autoPlayFunc()",this.spaceTime);
this.autoPlay=true;
};
this.autoPlayFunc=function(){
if(this.autoPlay==false||this.mouseIn==true){
return ;
}
this.nextLabel();
};
this.nextLabel=function(){
var a=this.selectedIndex;
a++;
if(a>=this.label.length){
a=0;
}
this.select(a);
if(this.autoPlay==true){
clearInterval(o);
o=setInterval("SubShowClass.childs["+this.ID+"].autoPlayFunc()",this.spaceTime);
}
};
this.previousLabel=function(){
var a=this.selectedIndex;
a--;
if(a<0){
a=this.label.length-1;
}
this.select(a);
if(this.autoPlay==true){
clearInterval(o);
o=setInterval("SubShowClass.childs["+this.ID+"].autoPlayFunc()",this.spaceTime);
}
};
this.stop=function(){
clearInterval(o);
this.autoPlay=false;
};
}
SubShowClass.$=function(a){
if(document.getElementById){
return eval("document.getElementById(\""+a+"\")");
}else {
return eval("document.all."+a);
}
};
第3个回答  2011-02-28
/* ========== 舌签构造函数 begin ========== */
var isIE = navigator.appVersion.indexOf("MSIE") != -1 ? true: false;
function SubShowClass(h, j, k, l, m) {
this.version = "1.0";
this.author = "mengjia";
this.parentObj = SubShowClass.$(h);
if (this.parentObj == null) {
throw new Error("SubShowClass(ID)参数错误:ID 对像存在!")
};
if (!SubShowClass.childs) {
SubShowClass.childs = new Array()
};
this.ID = SubShowClass.childs.length;
SubShowClass.childs.push(this);
this.lock = false;
this.label = [];
this.defaultID = k == null ? 0 : k;
this.selectedIndex = this.defaultID;
this.openClassName = l == null ? "selected": l;
this.closeClassName = m == null ? "": m;
this.mouseIn = false;
var n = Function("SubShowClass.childs[" + this.ID + "].mouseIn = true");
var o = Function("SubShowClass.childs[" + this.ID + "].mouseIn = false");
if (isIE) {
this.parentObj.attachEvent("onmouseover", n)
} else {
this.parentObj.addEventListener("mouseover", n, false)
};
if (isIE) {
this.parentObj.attachEvent("onmouseout", o)
} else {
this.parentObj.addEventListener("mouseout", o, false)
};
if (typeof(j) != "string") {
j = "onmousedown"
};
j = j.toLowerCase();
switch (j) {
case "onmouseover":
this.eventType = "mouseover";
break;
case "onmouseout":
this.eventType = "mouseout";
break;
case "onclick":
this.eventType = "click";
break;
case "onmouseup":
this.eventType = "mouseup";
break;
default:
this.eventType = "mousedown"
};
this.addLabel = function(a, b, c, d, e) {
if (SubShowClass.$(a) == null) {
throw new Error("addLabel(labelID)参数错误:labelID 对像存在!")
};
var f = this.label.length;
if (c == "") {
c = null
};
this.label.push([a, b, c, d, e]);
var g = Function('SubShowClass.childs[' + this.ID + '].select(' + f + ')');
if (isIE) {
SubShowClass.$(a).attachEvent("on" + this.eventType, g)
} else {
SubShowClass.$(a).addEventListener(this.eventType, g, false)
};
if (f == this.defaultID) {
SubShowClass.$(a).className = this.openClassName;
if (SubShowClass.$(b)) {
SubShowClass.$(b).style.display = ""
};
if (c != null) {
this.parentObj.style.background = c
};
if (d != null) {
eval(d)
}
} else {
SubShowClass.$(a).className = this.closeClassName;
if (SubShowClass.$(b)) {
SubShowClass.$(b).style.display = "none"
}
};
if (SubShowClass.$(b)) {
if (isIE) {
SubShowClass.$(b).attachEvent("onmouseover", n)
} else {
SubShowClass.$(b).addEventListener("mouseover", n, false)
};
if (isIE) {
SubShowClass.$(b).attachEvent("onmouseout", o)
} else {
SubShowClass.$(b).addEventListener("mouseout", o, false)
}
}
};
this.select = function(a) {
if (typeof(a) != "number") {
throw new Error("select(num)参数错误:num 不是 number 类型!")
};
var i;
for (i = 0; i < this.label.length; i++) {
if (i == a) {
SubShowClass.$(this.label[i][0]).className = this.openClassName;
if (SubShowClass.$(this.label[i][1])) {
SubShowClass.$(this.label[i][1]).style.display = ""
};
if (this.label[i][2] != null) {
this.parentObj.style.background = this.label[i][2]
};
if (this.label[i][3] != null) {
eval(this.label[i][3])
}
} else if (this.selectedIndex == i) {
SubShowClass.$(this.label[i][0]).className = this.closeClassName;
if (SubShowClass.$(this.label[i][1])) {
SubShowClass.$(this.label[i][1]).style.display = "none"
};
if (this.label[i][4] != null) {
eval(this.label[i][4])
}
}
};
this.selectedIndex = a
};
this.random = function() {
if (arguments.length != this.label.length) {
throw new Error("random()参数错误:参数数量与标签数量不符!")
};
var a = 0,
i;
for (i = 0; i < arguments.length; i++) {
a += arguments[i]
};
var b = Math.random(),
percent = 0;
for (i = 0; i < arguments.length; i++) {
percent += arguments[i] / a;
if (b < percent) {
this.select(i);
break
}
}
};
this.autoPlay = false;
var p = null;
this.spaceTime = 5000;
this.play = function(a) {
if (typeof(a) == "number") {
this.spaceTime = a
};
clearInterval(p);
p = setInterval("SubShowClass.childs[" + this.ID + "].nextLabel()", this.spaceTime);
this.autoPlay = true
};
this.nextLabel = function() {
if (this.autoPlay == false || this.mouseIn == true) {
return
};
var a = this.selectedIndex;
a++;
if (a >= this.label.length) {
a = 0
};
this.select(a)
};
this.stop = function() {
clearInterval(p);
this.autoPlay = false
}
};
SubShowClass.$ = function(a) {
if (document.getElementById) {
return eval('document.getElementById("' + a + '")')
} else {
return eval('document.all.' + a)
}
}
/* ========== 舌签构造函数 end ========== */
相似回答