3 楼的不行,MyEclipse 中可以格式化 js 脚本的功能我的办法是写一个过滤器,如果内容中有直接发问 *.js 的地址就 转到其他页面……
解决方案 »
- ssh整合会话工厂获得
- 来大神!!求swing界面和jsp界面的切换方法,就是在jsp里怎么写js语句实现点击按钮跳到swing界面去, swing主函数已写完,之前试了下网上说的在
- jsp怎么做popup窗口
- 房屋租赁网站
- JSP 如何使用FusionCharts
- vcode.jsp
- 关于参数传递的问题!(急!大侠帮忙)
- 怎样用让鼠标在某图上停留时,鼠标是手形,但不能用<a href=".."> 多谢,巨急!
- 还是bean作连接池的问题,迷惑,如何测试,池的最大连结数是否生效
- 微信高级群发接口问题 根据OpenID列表群发 错误码40032
- Jquery插件ddcombobox使用
- S2SH架构,如何根据异常信息,在页面给客户报错误号?
压缩http://www.jb51.net/tools/jsmin/
var currentF=1;
document.getElementById("upbtn").style.display="none";
var mainobj = document.getElementById("main");
var frameheight = 237;
var scrolling=0;
var speed = 20;
var checkloaded=new Array();
for(i=1;i<=3;i++){
checkloaded[i]=0;
}
function checkdamie(n){
checkloaded[n]=1;
//alert(checkloaded[n])
}
function alertloading(sdirection){
scrolling=0;
if(sdirection == "down"){
currentF--;
}
else{
currentF++;
}
//alert("正在下载数据,请稍等");
}
function scrolldown(f){
switch (f){
case 2:
if (mainobj.scrollTop>=frameheight){
clearInterval(inter);
mainobj.scrollTop=frameheight;
scrolling=0;
}
else{mainobj.scrollTop+=speed;}
break;
case 3:
if (mainobj.scrollTop>=frameheight*2){
mainobj.scrollTop=frameheight*2;
clearInterval(inter);
scrolling=0;
}
else{mainobj.scrollTop+=speed;}
break;
}
}
function scrollup(f){
switch (f){
case 1:
if (mainobj.scrollTop<=0){
clearInterval(inter1);
mainobj.scrollTop=0;
scrolling=0;
}
else{
mainobj.scrollTop-=speed;
}
break;
case 2:
if (mainobj.scrollTop<=frameheight){
mainobj.scrollTop=frameheight;
clearInterval(inter1);
scrolling=0;
}
else{
mainobj.scrollTop-=speed;
}
break;
}
}
function slidedown(){
//slide
if (scrolling==0){
scrolling=1;
currentF++;
obj=eval("document.getElementById('f"+currentF+"')");
obj.style.display="block";
if (checkloaded[currentF]==1){
inter=eval("setInterval('scrolldown("+currentF+")',5)");
//led
document.getElementById("upbtn").style.display="";
if (currentF==3){
document.getElementById("downbtn").style.display="none";
}
for (i=1;i<=3;i++){
eval("document.getElementById('led"+i+"').className='NUM1'");
}
eval("document.getElementById('led"+currentF+"').className='NUM2'");
}
else{
//alert(checkloaded[currentF]);
alertloading("down");
}
}
}
function slideup(){
//slide
if (scrolling==0){
scrolling=1;
currentF--;
obj=eval("document.getElementById('f"+currentF+"')");
obj.style.display="block";
if (checkloaded[currentF]==1){
inter1=eval("setInterval('scrollup("+currentF+")',5)");
//led
document.getElementById("downbtn").style.display="";
if (currentF==1){
document.getElementById("upbtn").style.display="none";
}
for (i=1;i<=3;i++){
eval("document.getElementById('led"+i+"').className='NUM1'");
}
eval("document.getElementById('led"+currentF+"').className='NUM2'");
}
else{
alertloading("up");
}
}
}
//auto slide
var direction = "down";
var interval01;
var autotime = 3000;
function autoslide(){
if(direction == "down"){
if (currentF == 2){
direction = "up";
}
slidedown();
//alert(direction);
}
if(direction == "up"){
if (currentF == 2){
direction = "down";
}
slideup();
//alert(direction);
}
}
function iniautoslide(){
interval01 = setInterval("autoslide()",autotime);
}
压缩混淆后
var UzvVist1=1;window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64"]("\x75\x70\x62\x74\x6e")["\x73\x74\x79\x6c\x65"]["\x64\x69\x73\x70\x6c\x61\x79"]="\x6e\x6f\x6e\x65";var gLcwbKba2=window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64"]("\x6d\x61\x69\x6e");var zsAeFzW3=237;var TbTcP4=0;var JyPDZip5=20;var FsypX6=new window["\x41\x72\x72\x61\x79"]();for(i=1;i<=3;i++){FsypX6[i]=0;}function checkdamie(IlXjyPK7){FsypX6[IlXjyPK7]=1;}function alertloading(b8){TbTcP4=0;if(b8=="\x64\x6f\x77\x6e"){UzvVist1--;}else{UzvVist1++;}}function scrolldown(pqNpyP9){switch(pqNpyP9){case 2:if(gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]>=zsAeFzW3){clearInterval(inter);gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]=zsAeFzW3;TbTcP4=0;}else{gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]+=JyPDZip5;}break;case 3:if(gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]>=zsAeFzW3*2){gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]=zsAeFzW3*2;clearInterval(inter);TbTcP4=0;}else{gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]+=JyPDZip5;}break;}}function scrollup(bQntiQKXz10){switch(bQntiQKXz10){case 1:if(gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]<=0){clearInterval(inter1);gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]=0;TbTcP4=0;}else{gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]-=JyPDZip5;}break;case 2:if(gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]<=zsAeFzW3){gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]=zsAeFzW3;clearInterval(inter1);TbTcP4=0;}else{gLcwbKba2["\x73\x63\x72\x6f\x6c\x6c\x54\x6f\x70"]-=JyPDZip5;}break;}}function slidedown(){if(TbTcP4==0){TbTcP4=1;UzvVist1++;obj=window["\x65\x76\x61\x6c"]("document.getElementById(\x27f"+UzvVist1+"\x27)");obj["\x73\x74\x79\x6c\x65"]["\x64\x69\x73\x70\x6c\x61\x79"]="\x62\x6c\x6f\x63\x6b";if(FsypX6[UzvVist1]==1){inter=window["\x65\x76\x61\x6c"]("setInterval(\x27scrolldown("+UzvVist1+")\x27,5)");window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64"]("\x75\x70\x62\x74\x6e")["\x73\x74\x79\x6c\x65"]["\x64\x69\x73\x70\x6c\x61\x79"]="";if(UzvVist1==3){window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64"]("\x64\x6f\x77\x6e\x62\x74\x6e")["\x73\x74\x79\x6c\x65"]["\x64\x69\x73\x70\x6c\x61\x79"]="\x6e\x6f\x6e\x65";}for(i=1;i<=3;i++){window["\x65\x76\x61\x6c"]("document.getElementById(\x27led"+i+"\x27).className=\x27NUM1\x27");}window["\x65\x76\x61\x6c"]("document.getElementById(\x27led"+UzvVist1+"\x27).className=\x27NUM2\x27");}else{alertloading("\x64\x6f\x77\x6e");}}}function slideup(){if(TbTcP4==0){TbTcP4=1;UzvVist1--;obj=window["\x65\x76\x61\x6c"]("document.getElementById(\x27f"+UzvVist1+"\x27)");obj["\x73\x74\x79\x6c\x65"]["\x64\x69\x73\x70\x6c\x61\x79"]="\x62\x6c\x6f\x63\x6b";if(FsypX6[UzvVist1]==1){inter1=window["\x65\x76\x61\x6c"]("setInterval(\x27scrollup("+UzvVist1+")\x27,5)");window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64"]("\x64\x6f\x77\x6e\x62\x74\x6e")["\x73\x74\x79\x6c\x65"]["\x64\x69\x73\x70\x6c\x61\x79"]="";if(UzvVist1==1){window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]["\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64"]("\x75\x70\x62\x74\x6e")["\x73\x74\x79\x6c\x65"]["\x64\x69\x73\x70\x6c\x61\x79"]="\x6e\x6f\x6e\x65";}for(i=1;i<=3;i++){window["\x65\x76\x61\x6c"]("document.getElementById(\x27led"+i+"\x27).className=\x27NUM1\x27");}window["\x65\x76\x61\x6c"]("document.getElementById(\x27led"+UzvVist1+"\x27).className=\x27NUM2\x27");}else{alertloading("\x75\x70");}}}var v11="\x64\x6f\x77\x6e";var S12;var WoVmNk13=3000;function autoslide(){if(v11=="\x64\x6f\x77\x6e"){if(UzvVist1==2){v11="\x75\x70";}slidedown();}if(v11=="\x75\x70"){if(UzvVist1==2){v11="\x64\x6f\x77\x6e";}slideup();}}function iniautoslide(){S12=setInterval("\x61\x75\x74\x6f\x73\x6c\x69\x64\x65\x28\x29",WoVmNk13);}
你格式化能有用么?
当然我这里只是举了个例子,至于压缩,混淆的工具lz自己选择