我一般用eclipse
【 在 heatwood (想不出) 的大作中提到: 】
从别人网站上下载回一段类似下面的代码,整个脚本就在一行中显示
这种代码要怎么阅读啊?有没有软件或者程序能够格式化,将它变成好阅读的格式?
(function(e){var n="ui-sel-container",j="ui-sel-value",b="ui-sel-list",g="ui
-sel-hover",a="ui-sel-active",d="ui-sel-selected",h="ui-sel-hide",i,m={width
:"90px"},l=function(p){var o=['<div class="'+b+" "+h+'"><div class="bd"><ul>
'];p.find("option").each(function(q,r){if(r.selected){i=r.innerHTML;o.push('
<li class="'+h+'"><a href="#'+q+'">'+i+"</a></li>")}else{o.push('<li><a href
="#'+q+'">'+r.innerHTML+"</a></li>")}});o.push('</ul></div><div class="ft"><
span> </span></div></div>');p.wrap('<div class="'+n+'"></div>').css("di
splay","none").parent().prepend(o.join("")).prepend('<div class="'+j+'" styl
e="width:'+p.cfg.width+'"><a href="#current">'+i+"</a></div>");p.parent().fi
nd("."+b).css("width",(parseInt(p.cfg.width,10)+2)+"px")},k=function(o){o.re
moveClass(a);o.find("."+b).addClass(h)},f=function(o){if(o.hasClass(a)){k(o)
}else{o.addClass(a);o.find("."+b).removeClass(h)}},c=function(p){var o=p.par
ent();o.find("a").click(function(s){var t=s.target.getAttribute("href",2).sp
lit("#")[1],q=e(s.target).parent(),r;if(/current/i.test(t)){f(o)}else{r=p[0]
[parseInt(t,10)];r.selected=true;if(p.cfg.callback){p.cfg.callback(r.text,r.
value,r)}q.parent().find("."+h).removeClass(h);q.addClass(h);o.find("."+j+"
a").text(r.text);k(o)}s.preventDefault();return false});o.find("."+j).mouseo
ver(function(q){o.addClass(g)}).mouseout(function(q){o.removeClass(g)});e("b
ody").click(function(q){k(o)})};e.fn.renderDropList=function(o){this.cfg=o||
{};for(var p in m){if(!o[p]){this.cfg[p]=m[p]}}l(this);c(this)}})(jQuery);fu
nction loadDeferImage(){$("img[data-defer-src]").attr("src",function(){retur
n $(this).attr("data-defer-src")})}$(function(){var b=$("#db-groups-cate .li
st li a"),a=$("#db-groups-cate .content .item"),c=0;b.each(function(d,e){$(e
).addClass("tab_"+d)});a.each(function(d,e){$(e).addClass("item_"+d)});b.cli
ck(function(i){i.preventDefault();var g=$(i.target),d=g.parent(),h,f,j=parse
Int(i.target.className.match(/tab_(\d{1,2})/i)[1],10);if(c===j){return}d.par
ent().find(".on").removeClass("on");d.addClass("on");a.filter(".item_"+c).fa
deOut("fast");h=a.filter(".item_"+j).removeClass("hide").fadeIn("fast");f=h.
find("script");if(f.length){h.html(f.html())}loadDeferImage();c=j})});$(wind
ow).load(function(){loadDeferImage()});(function(){var a,j,n=".submenu .sele
cted",d=".submenu .menu",b,c,g,e,l,f='<div class="submenu"><div class="selec
ted">{SELECTED}<span>+</span></div><div class="menu hide"><ul>{LIST}</ul></d
iv></div>',k=function(p){var o=p.length*12+20;c.parent().width(o);g.width(e-
o+4)},i=function(){var p=[],r,s;a=j.find("select");if(!a[0]){return}r=a[0].o
ptions[a[0].selectedIndex].text;for(var q=0,o=a[0].options.length;q<o;q++){s
=a[0].options[q];if(r===s.text){p.push('<li class="hide"><a href="#'+q+'">'+
s.text+"</a></li>")}else{p.push('<li><a href="#'+q+'">'+s.text+"</a></li>")}
}a.parent().after(f.replace("{SELECTED}",r).replace("{LIST}",p.join("")));b=
j.find(d);c=j.find(n);g=$(j.find("input")[0]);e=g.width();k(r);c.click(funct
ion(v){var u=$(v.currentTarget),t=u.hasClass("open");if(t){u.removeClass("op
en");b.addClass("hide")}else{u.addClass("open");b.removeClass("hide")}v.stop
Propagation()}).mouseover(function(u){var t=$(u.currentTarget);t.parent().cs
s("background-color","#f2f2f2")}).mouseout(function(u){var t=$(u.currentTarg
et);t.parent().css("background-color","#fff")});b.click(function(z){var y=z.
target,x,t,u;if(y.tagName.toLowerCase()==="a"){x=parseInt(y.href.split("#")[
1]);u=$(y).html();a[0].options[x].selected=true;c.html(u+"<span>+</span>");b
.find(".hide").removeClass("hide");$(y).parent().addClass("hide");g[0].focus
();z.preventDefault();k(u);if(l){l(x,a[0],j)}}});$(document.body).click(func
tion(t){c.removeClass("open");b.addClass("hide")})},h=function(){var o=j.fin
d("input[type=text]");if(o[0].value===""||o[0].value===o.attr("title")){o[0]
.value=o.attr("title");o.css("color","#d4d4d4")}o.data("label",o.attr("title
")).attr("title","");o.focus(function(){if(this.value===$(this).data("label"
)){this.value="";$(this).css("color","#000")}}).blur(function(){if(this.valu
e===""){this.value=$(this).data("label");$(this).css("color","#d4d4d4")}})},
m=function(){h();i();j.submit(function(p){var o=$(this).find("input")[0];if(
o.value===o.rel){o.value=""}})};$.fn.prettyField=function(o){j=this;l=o;m()}
})();$(function(){$("#header .site-nav-logo a").mouseover(function(a){$(a.cu
rrentTarget).addClass("on")}).mouseout(function(a){$(a.currentTarget).remove
Class("on")})});
--
FROM 122.225.226.*