js 整形 马上结账。

huangdong1900 2007-08-09 02:25:32
长篇的js,可以用什么方法,让它快速的格式规范阿??有什么工具可以用吗?
比如:
var _3=new AJS.fx.Base();
_3.elm=AJS.$(_1);
_3.setOptions(_2);
_3.options.duration=600;
AJS.update(_3,{increase:function(){
if(this.now==7){
_1.style.backgroundColor="transparent";
}else{
_1.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)];
}
}});
return _3.custom(6,0);
},fadeIn:function(_4,_5){
_5=_5||{};
if(!_5.from){
_5.from=0;
AJS.setOpacity(_4,0);
}
if(!_5.to){
_5.to=1;
}
var s=new AJS.fx.Style(_4,"opacity",_5);
return s.custom(_5.from,_5.to);
},fadeOut:function(_7,_8){
_8=_8||{};
if(!_8.from){
_8.from=1;
}
if(!_8.to){
_8.to=0;
}
_8.duration=300;
var s=new AJS.fx.Style(_7,"opacity",_8);
return s.custom(_8.from,_8.to);
},setWidth:function(_a,_b){
var s=new AJS.fx.Style(_a,"width",_b);
return s.custom(_b.from,_b.to);
},setHeight:function(_d,_e){
var s=new AJS.fx.Style(_d,"height",_e);
return s.custom(_e.from,_e.to);
}};
AJS.fx.Base=new AJS.Class({init:function(){
AJS.bindMethods(this);
},setOptions:function(_10){
this.options=AJS.update({onStart:function(){
},onComplete:function(){
},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50},_10||{});
},step:function(){
var _11=new Date().getTime();
if(_11<this.time+this.options.duration){
this.cTime=_11-this.time;
this.setNow();
}else{
setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);
this.clearTimer();
this.now=this.to;
}
this.increase();
},setNow:function(){
this.now=this.compute(this.from,this.to);
},compute:function(_12,to){
var _14=to-_12;
return this.options.transition(this.cTime,_12,_14,this.options.duration);
},clearTimer:function(){
clearInterval(this.timer);
this.timer=null;
return this;
},_start:function(_15,to){
if(!this.options.wait){
this.clearTimer();
}
if(this.timer){
return;
}
...全文
180 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
huangdong1900 2007-08-09
  • 打赏
  • 举报
回复
人家公司里不让装notbeans,我手工了,打算
谢谢大家阿
ckpckphaha 2007-08-09
  • 打赏
  • 举报
回复
SourceFormatX 找破解版的。

破解方法:

http://bbs.pediy.com/showthread.php?s=&threadid=33071
lijunjiang 2007-08-09
  • 打赏
  • 举报
回复
还没搞定?
huangdong1900 2007-08-09
  • 打赏
  • 举报
回复
我就是想调整格式阿
痛苦啊,好多js阿
jimu8130 2007-08-09
  • 打赏
  • 举报
回复
楼主这个js不是标准的js吧,这样顶多就是调整下格式罢了
huangdong1900 2007-08-09
  • 打赏
  • 举报
回复
这么简单就可以吗?那我赶紧去找来试试看
lijunjiang 2007-08-09
  • 打赏
  • 举报
回复
以前用过eclipse 和 netbeans 都可以规范格式
按下ctrl+shift+f就行了
huangdong1900 2007-08-09
  • 打赏
  • 举报
回复
还有别的好方法吗?
plsandslp 2007-08-09
  • 打赏
  • 举报
回复
utraledit还比较好用

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧