📄 javacript.asp
字号:
<SCRIPT LANGUAGE="JavaScript">
<!--
var baseurl='<%=GetBaseUrl%>';
//reloadPage(true);
function ChFolder(dir,mode)
{
var obj;
obj=document.boxobj;
if(!dir)
{alert('请输入要浏览的目录');return;}
if (obj.fgit)
{
if (obj.fgit.checked)
dir=escape(dir)+'&Option=<%=GetOption%>'+'&fgit='+obj.fgit.value;
else
dir=escape(dir)+'&Option=<%=GetOption%>';
}
else
{dir=escape(dir)+'&Option=<%=GetOption%>';
}
if(mode)
{
if(obj.filter.value)
if (obj.ULcase.checked==true)
obj.action='<%=GetFileName%>?filter='+obj.filter.value+'&ULcase=1&path=<%=GetPath%>'+dir;
else
obj.action='<%=GetFileName%>?filter='+obj.filter.value+'&ULcase=0&path=<%=GetPath%>'+dir;
else
obj.action='<%=GetFileName%>?path=<%=GetPath%>'+dir;
}
else
{
if(obj.filter.value)
if (obj.ULcase.checked==true)
obj.action='<%=GetFileName%>?filter='+obj.filter.value+'&ULcase=1&path='+dir;
else
obj.action='<%=GetFileName%>?filter='+obj.filter.value+'&ULcase=0&path='+dir;
else
obj.action='<%=GetFileName%>?path='+dir;
}
obj.submit();
}
function OpenIt(name,target)
{
var opp=<%=GetOption%>;
name=escape(name);
if (opp==6)
window.open('EditFile_Adv.asp?action=OpenIt&Option=5&path=<%=GetPath%>'+name,'_self');
else
{ window.open('EditBrower.asp','');
var sss="OpenItss("+"\""+name+"\"\,"+"\"mainFrame\""+")";
window.setTimeout(sss,'2000');
}
}
function OpenItss(name,target)
{
window.open('EditFile_Adv.asp?action=OpenIt&Option=5&path=<%=GetPath%>'+name,target);
}
function renFile(oldName)
{
str=prompt('将文件 '+oldName+' 更名为:',oldName);
if(!str)return;
obj=document.boxobj;
obj.action=baseurl+'&action=RenFile&from='+oldName+'&to='+str;
obj.submit();
}
function renFolder(oldName)
{
str=prompt('将目录 '+oldName+' 更名为:',oldName);
if(!str)return;
obj=document.boxobj;
obj.action=baseurl+'&action=RenFolder&from='+oldName+'&to='+str;
obj.submit();
}
function paste()
{
<%if Session("Filebuffer")="" or Session("Folderbuffer")="" then
Response.write("alert('剪贴板中没有数据!');"&vbcrlf)
Response.write "return;"
else%>
if(!confirm('确定要将文件粘贴到此目录吗?'))
return;
else
{
obj=document.boxobj;
if (obj.fgit.checked==true)
obj.action=baseurl+'&fgit=1&action=Paste';
else
obj.action=baseurl+'&action=Paste';
obj.submit();
}
<%end if%>
}
function DelAll()
{
obj=document.boxobj;
if(!confirm('确定要删除选中的目录与文件吗?'))
return;
else
{
obj.action=baseurl+'&action=DelAll';
obj.submit();
}
}
function listAll()
{
obj=document.boxobj;
if(!confirm('确定要遍历当前所有目录吗?'))
return;
else
{
obj.action='listfolder.asp?action=list&path=<%=GetPath%>';
obj.submit();
}
}
function listAllfile()
{
obj=document.boxobj;
if(!confirm('确定要遍历当前所有目录下的文件吗?'))
return;
else
{
obj.action='listfolder.asp?action=listfile&path=<%=GetPath%>';
obj.submit();
}
}
function MkFolders()
{
str=prompt('新建目录:','');
if(!str)return;
obj=document.boxobj;
obj.action=baseurl+'&action=MkFolder&to='+str;
obj.submit();
}
function mkfile()
{
str=prompt('新建文本文件:','newtxt.txt');
if(!str)return;
obj=document.boxobj;
obj.action=baseurl+'&action=MkFile&to='+str;
obj.submit();
}
function SelectFilesall(action)
{
i=1;
obj=document.boxobj;
while(eval('obj.chidf'+i))
{
obj1=eval('obj.chidf'+i);
obj1.checked=action;
i++;
}
}
function SelectFolderall(action)
{
i=1;
obj=document.boxobj;
while(eval('obj.chidd'+i))
{
obj1=eval('obj.chidd'+i);
obj1.checked=action;
i++;
}
}
function FilesOption(action)
{
i=1;
issel=0;
obj=document.boxobj;
while(eval('obj.chidf'+i))
{
obj1=eval('obj.chidf'+i);
if(obj1.checked)
{issel=1;break;}
i++;
}
i=1
while(eval('obj.chidd'+i))
{
obj1=eval('obj.chidd'+i);
if(obj1.checked)
{issel=1;break;}
i++;
}
if(!issel)
{alert('请先选择文件与目录。');return;}
obj.action=baseurl+'&action='+action;
obj.submit();
}
function refreshWindow()
{
var obj=document.boxobj;
var iurl
if (obj.fgit)
{
if (obj.fgit.checked)
iurl=baseurl+'&fgit='+obj.fgit.value;
else
iurl=baseurl;
}
else
{iurl=baseurl;}
obj.action=iurl;
obj.submit();
}
function DelFile(str)
{
if(!confirm('确定要删除文件'+str+'吗?'))
return;
obj=document.boxobj;
obj.action=baseurl+'&action=DelFile&file='+str;
obj.submit();
}
function DelFolder(str)
{
if(!confirm('确定要删除目录'+str+'吗?'))
return;
obj=document.boxobj;
obj.action=baseurl+'&action=DelFolder&file='+str;
obj.submit();
}
function chpagetop(dir,mode)
{
var obj;obj=document.boxobj;
if(!obj.pagetop.value)
{alert('请输入要进入的页号');return;}
if(mode)
{
if(obj.pagetop.value)
if (obj.ULcase.checked==true)
{obj.action='<%=GetFileName%>?page='+obj.pagetop.value+'&filter=<%=GetFilter%>&ULcase=1&path=<%=GetPath%>'+dir;}
else
{obj.action='<%=GetFileName%>?page='+obj.pagetop.value+'&filter=<%=GetFilter%>&ULcase=0&path=<%=GetPath%>'+dir;}
else
obj.action='<%=GetFileName%>?path=<%=GetPath%>'+dir;
}
else
{
if(obj.pagetop.value)
if (obj.ULcase.checked==true) obj.action='<%=GetFileName%>?page='+obj.pagetop.value+'&filter=<%=GetFilter%>&ULcase=1&path='+dir;
else
obj.action='<%=GetFileName%>?page='+obj.pagetop.value+'&filter=<%=GetFilter%>&ULcase=0&path='+dir;
else obj.action='<%=GetFileName%>?path='+dir;
}
obj.submit();
}
function chpagebottom(dir,mode)
{
var obj;obj=document.boxobj;
if(!obj.pagebottom.value)
{alert('请输入要进入的页号');return;}
if(mode)
{
if(obj.pagebottom.value)
if (obj.ULcase.checked==true){ obj.action='<%=GetFileName%>?page='+obj.pagebottom.value+'&filter=<%=GetFilter%>&ULcase=1&path=<%=GetPath%>'+dir;}
else{ obj.action='<%=GetFileName%>?page='+obj.pagebottom.value+'&filter=<%=GetFilter%>&ULcase=0&path=<%=GetPath%>'+dir;}
else obj.action='<%=GetFileName%>?path=<%=GetPath%>'+dir; }
else
{
if(obj.pagebottom.value)
if (obj.ULcase.checked==true){ obj.action='<%=GetFileName%>?page='+obj.pagebottom.value+'&filter=<%=GetFilter%>&ULcase=1&path='+dir;}
else{ obj.action='<%=GetFileName%>?page='+obj.pagebottom.value+'&filter=<%=GetFilter%>&ULcase=0&path='+dir;}
else obj.action='<%=GetFileName%>?path='+dir; }
obj.submit();
}
function ClipBoard()
{
window.open('ClipBoard.asp','_blank','width=450,height=300,scrollbars=yes,Copyhistory=no,resizable=yes');
}
function reloadPage(init)
{ //reloads the window if Nav4 resized
if (init==true) with (navigator)
{
if ((appName=="Netscape")&&(parseInt(appVersion)==4))
{
document.pageW=innerWidth;
document.pageH=innerHeight;
onresize=reloadPage;
}
}
else if (innerWidth!=document.pageW || innerHeight!=document.pageH)
location.reload();
}
function ExecuteIt(str)
{
window.open('<%=replace(Server.urlencode(GetPath),"%2F","/")%>'+escape(str),'_blank');
}
function aboutme()
{
window.showModalDialog("aboutme.asp","","dialogWidth:300px;dialogHeight:400px;dialogleft:200;dialogtop:200;scroll:no;status:no;help:no");
}
//-->
</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -