您好,欢迎访问一九零五行业门户网

硬盘浏览程序,保存成网页格式便可使用_javascript技巧

硬盘浏览程序,保存成网页格式便可使用,放到随意一个盘,不要放桌面就可以了
复制代码 代码如下:
;
        ppathcounter++;
      }
    }
   subfolfil=找到+fcount+个文件夹,;
   fcount=0;
   ffile=fso.getfolder(pathstr).files;
   getdata=new enumerator(ffile);
   outstr+=文  件:[隐藏];
   for(;!getdata.atend();getdata.movenext())
    {
     attribu=getdata.item().attributes;
     if(hidestate||attribu==0||attribu==1||attribu==32||attribu==33)
      {
        fcount++;
        outstr+=+getdata.item().name+
;
      }
    } 
   outstr+=
;
   subfolfil+=fcount+个文件.;
   document.getelementbyid(showcontent).innerhtml=outstr;
   document.getelementbyid(currentdrive).innertext=currentdrive;
   document.getelementbyid(showdriveatt).innertext=att;
   att=文件夹名称:\n\n文件夹大小:\n创建时间:\n\n修改时间:\n\n访问时间:\n\n;
   document.getelementbyid(showfolderatt).innertext=att;
   document.getelementbyid(subfolfil).innertext=subfolfil;
   att=[打开];
   att+=[收藏];
   document.getelementbyid(openfol).innerhtml=att;
   document.getelementbyid(showorhide).focus();
   getdata=;
   }catch(errorinf){alert(errorinf.description+\n\n请不要随便改变数据文件*.ini文件中的内容.);}
}
function folderactive(folderval)
{
try
{
   var att=,fol=,totalsize=0,sizesign=;
   openfolder(folderval);
   if(!folderval.match(/^[a-z]\:\\$/i))
    {
     fol=fso.getfolder(folderval);
     totalsize=fol.size/math.pow(2,30);
     totalsize>1 ? sizesign=gb:(totalsize=totalsize*math.pow(2,10),sizesign=mb);
     (totalsize     totalsize=math.round((totalsize)*100)/100+sizesign;
     att+=文件夹名称:\n+fol.name+\n文件夹大小:+totalsize+\n创建时间:\n;
     att+=fol.datecreated+\n修改时间:\n+fol.datelastmodified+\n访问时间:\n+fol.datelastaccessed;
     document.getelementbyid(showfolderatt).innertext=att+\n;
    }
}catch(errorinf){alert(errorinf.description+\n\n请不要随便改变数据文件*.ini文件中的内容.);}
}
function openfolder(currfolder)
{
try
{
   var sign=0,outstr=,attribu=0,subfolfil=,fcount=0;
   if(currfolder==){alert(没有选择文件夹.);return false;}
   currentdrive=currfolder;
   ffolder=fso.getfolder(currfolder).subfolders;
   getdata=new enumerator(ffolder);
   outstr=文件夹:[隐藏];
   ppathcounter=0;
   for(;!getdata.atend();getdata.movenext())
    {
     attribu=getdata.item().attributes;
     if(hidestate||attribu==16||attribu==17||attribu==48||attribu==49)
      {
        fcount++;
        ppath[ppathcounter]=currfolder.replace(/\\+$/i,)+\\+getdata.item().name;
        outstr+=        outstr+=return false;\>+getdata.item().name+
;
        ppathcounter++;
      }
    }
   subfolfil=找到+fcount+个文件夹,;
   fcount=0;
   ffile=fso.getfolder(currfolder).files;
   getdata=new enumerator(ffile);
   outstr+=
文  件:[隐藏];
   for(;!getdata.atend();getdata.movenext())
    {
     attribu=getdata.item().attributes;
     if(hidestate||attribu==0||attribu==1||attribu==32||attribu==33)
      {
        fcount++;
        if(openfromfav==0)
          outstr+=+getdata.item().name+
;
        else
          outstr+=+getdata.item().name+
;
      }
    }   
   outstr+=
;  
   subfolfil+=fcount+个文件.;
   document.getelementbyid(showcontent).innerhtml=outstr;
   document.getelementbyid(currentdrive).innertext=currentdrive;
   att=文件夹名称:\n\n文件夹大小:\n创建时间:\n\n修改时间:\n\n访问时间:;
   document.getelementbyid(showfolderatt).innertext=att;
   document.getelementbyid(subfolfil).innertext=subfolfil;
   att=[打开];
   att+=[收藏];
   document.getelementbyid(openfol).innerhtml=att;
   getdata=;
   openfromfav=0;
  }catch(errorinf){alert(errorinf.description+\n\n请不要随便改变数据文件*.ini文件中的内容.);}
}
function upfile()
{
   var rootpath=;
   rootpath=currentdrive;
   if(!rootpath.match(/^[a-z]\:\\$/i))
     {
        rootpath=rootpath.replace(/\\[^\\]*$/,);
        if(rootpath.match(/^[a-z]\:$/i)){rootpath+=\\;}
        folderactive(rootpath);
     }
   else
     alert(驱动器根目录.);
}
function flashdrive()
{
  folderactive(currentdrive);
}
function openfav()
{
   lastfav=;
   var outstr=,i=0;
   for(i;i    {
      outstr+=      outstr+=favactive(this.id);return false;\ target='_blank'>+favorite[i].replace(/^.+\\/,)+
;
    }
   document.getelementbyid(showfavorite).innerhtml=outstr;
   document.getelementbyid(delfav).value=;
}
function favactive(favid)
{
   var i=parseint(favid.match(/\d/));
   if(lastfav!=)
      document.getelementbyid(lastfav).style.backgroundcolor=#cccccc;
   lastfav=favid;
   document.getelementbyid(delfav).value=favorite[i];
   document.getelementbyid(lastfav).style.backgroundcolor=#ffffdd;
   document.getelementbyid(showorhide).focus();
}
function addfav()
{
try
{
   if(currentdrive.match(/^[a-z]\:\\$/i))
     {
       alert(只能收藏文件夹.);
       return false;
     }
   var i=0;
   for(i=0;i     {
       if(favorite[i]==currentdrive)
         {
            alert(常用文件夹中已经存在该文件夹.);
            return false;
         }
     }
   if(fso.fileexists(favpath))
     {
       ffile=fso.opentextfile(favpath,8);
     }
   else
     {
       ffile=fso.createtextfile(favpath,true);
     }
   ffile.write(|+currentdrive);
   ffile.close();
   favorite[favcounter]=currentdrive;
   favcounter++;
   openfav();
   alert(添加成功.);
}catch(errorinf){alert(errorinf.description+\n\n请不要随便删除数据文件*.ini文件.);}
}
function delfav()
{
try
{
   var delpath=document.getelementbyid(delfav).value;
   var i=lastfav.match(/\d/),j=parseint(i);
   var newfav=;
   document.getelementbyid(showorhide).focus();
   if(delpath==)
     {
        alert(没有选择常用文件夹.);
        return false;
     }
   if(confirm(确定删除常用文件夹(并非从硬盘删除):\n+delpath+\n?))
     {
        favcounter--;
        for(j;j          favorite[j]=favorite[j+1];
        for(j=0;j          newfav+=favorite[j]+|;
        ffile=fso.opentextfile(favpath,2);
        newfav=newfav.replace(/^\||\|$/,);
        ffile.writeline(newfav);
        ffile.close();
        openfav();
        document.getelementbyid(delfav).value=;
        alert(删除成功.);
     }
}catch(errorinf){document.getelementbyid(delfav).value=;alert(errorinf.description+\n\n请不要随便删除数据文件*.ini文件.);}
}
function unfurlorfold(objid,obj)
{
  if(obj.innertext==隐藏)
     {
       obj.innertext=显示;
       document.getelementbyid(objid).style.display=none;
     }
  else
     {
       obj.innertext=隐藏;
       document.getelementbyid(objid).style.display=;
     }  
  document.getelementbyid(showorhide).focus(); 
  return false;  
}
filelookthroughadmin v1.0
filelookthroughadmin
收藏夹
        文件夹及文件
        相关信息
harddrives>>
tag>>
displaycontent
currentpath>>
常用文件夹:
onmouseover=this.style.backgroundcolor='#ffffdd';
           onmouseout=this.style.backgroundcolor='#cccccc';>
          上一级目录
当前驱动器信息:
当前文件夹信息:
删除常用文件夹:
p:
[执行删除]
design:sgw.lking(∮lking♂)[fs:ecjtu2006|qq:28857496|e-mail:sgw.lking@gmail.com][@06.11]
其它类似信息

推荐信息