最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

硬盤瀏覽程序,保存成網(wǎng)頁格式便可使用

 更新時間:2006年12月03日 00:00:00   作者:  
硬盤瀏覽程序,保存成網(wǎng)頁格式便可使用,放到隨意一個盤,不要放桌面就可以了
復(fù)制代碼 代碼如下:

<html>
<head>
<script language="javascript" type="text/javascript">
var errorinf=new Error();
var fso,fdrive,ffolder,ffile;
var getdata="",selfpath="",drvpath="",favpath="";
var drive=new Array(),favorite=new Array();
var currentdrive="";
var hidestate=false;
var lastdrive="",lastfav="";
var ppath=new Error(),ppathcounter=0,favcounter=0;
var openfromfav=0;
function initdoc()
{
try
{
   var outstr="",counter=0,i=0,writestr="";
   fso=new ActiveXObject("Scripting.FileSystemObject");
   selfpath=fso.GetParentFolderName(location.pathname.replace(/\//,""));
   drvpath=selfpath+"\\drvinf.ini";
   /*Get the hard drives on the computer.*/
   if(!fso.FileExists(drvpath))
      {
         fdrive=fso.Drives;
         getdata=new Enumerator(fdrive);
         for(;!getdata.atEnd();getdata.moveNext())
           if(getdata.item().DriveType==2)
             {
                drive[counter]=getdata.item().DriveLetter;
                writestr+=drive[counter]+"$";
                counter++;
              }
         ffile=fso.CreateTextFile(drvpath,true);
         writestr=writestr.replace(/\$$/,"");
         ffile.WriteLine(writestr+"\r");
         ffile.Close();
      }
   else
      {
        ffile=fso.OpenTextFile(drvpath,1);
        getdata=ffile.ReadAll().replace(/\'|\"|\\|\/|\:|\s+/g,"");
        getdata=getdata.replace(/^\$+|\$+$/,"");
        getdata=getdata.replace(/\$\$+/,"$");
        drive=getdata.split("$");
        ffile.Close();
      }
   for(i=0;i<drive.length;i++)
      outstr+="[<a href='' id='drive"+drive[i]+"' onClick=\"driveactive(drive["+i+"]);return false;\">本地磁盤:"+drive[i]+"</a>]";
   outstr+="顯示隱藏內(nèi)容<input style='height:15px;border:none;' type='checkbox' id='showorhide' onClick='hidestate=this.checked;flashdrive();'>"
   document.getElementById("drives").innerHTML=outstr;
   getdata="";outstr="";
   /*Get the exist item.*/
   favpath=selfpath+"\\favinf.ini";
   if(fso.FileExists(favpath))
    {
      ffile=fso.OpenTextFile(favpath,1);
      if(!ffile.AtEndOfStream)
       {
          getdata=ffile.ReadAll().replace(/\"|\s+/g,"");
          getdata=getdata.replace(/^\|+|\|+$/,"");
          getdata=getdata.replace(/\|\|+/,"|");
          favorite=getdata.split("|");
       }
      ffile.Close();
      if(favorite[0]=="")
        favcounter=0;
      else
        favcounter=favorite.length;
    }
   else
    {
      ffile=fso.CreateTextFile(favpath,true);
      ffile.Close();
      favcounter=0;
    }  
   openfav();
   driveactive("C");
   getdata="";
}catch(errorinf){alert(errorinf.description+"\n\n請不要隨便改變數(shù)據(jù)文件*.ini文件中的內(nèi)容.");}
}
function driveactive(driveval)
{
try{  
   if(lastdrive==("drive"+driveval)&&currentdrive.match(/^[a-z]\:\\$/i))
     {
       document.getElementById("showorhide").focus();
       return false;
     }
   if(lastdrive=="")lastdrive="driveC";
   document.getElementById(lastdrive).style.backgroundColor="#CCCCCC";
   lastdrive="drive"+driveval;
   document.getElementById(lastdrive).style.backgroundColor="#FFFFDD";
   var att="",drv,totalsize,freespace,usespace,outstr="",pathstr="",attribu=0,subfolfil="",fcount=0;
   drv=fso.GetDrive(driveval);
   totalsize=Math.round((drv.TotalSize/Math.pow(2,30))*100)/100;
   freespace=Math.round((drv.FreeSpace/Math.pow(2,30))*100)/100;
   usespace=Math.round((totalsize-freespace)*100)/100;
   totalsize>1 ? totalsize+="GB":totalsize=totalsize*Math.pow(2,10)+"MB";
   freespace>1 ? freespace+="GB":freespace=freespace*Math.pow(2,10)+"MB";
   usespace>1 ? usespace+="GB":usespace=usespace*Math.pow(2,10)+"MB";
   att+="本地磁盤:"+driveval+"\n文件系統(tǒng):"+drv.FileSystem+"\n磁盤大小:"+totalsize+"\n已用空間:"+usespace+"\n可用空間:"+freespace+"\n";
   outstr="";
   currentdrive=pathstr=driveval+":\\";
   ffolder=fso.GetFolder(pathstr+"\\").SubFolders;
   getdata=new Enumerator(ffolder);
   outstr="<div class='showcon'>文件夾:[<a href='' onclick=\"return unfurlorfold('folshow',this);\">隱藏</a>]<div id='folshow'>";
   ppathcounter=0;
   for(;!getdata.atEnd();getdata.moveNext())
    {
     attribu=getdata.item().Attributes;
     if(hidestate||attribu==16||attribu==17||attribu==48||attribu==49)
      {
        fcount++;
        ppath[ppathcounter]=driveval+":\\"+getdata.item().name;
        outstr+="<div><a href='' onClick=\"folderactive(ppath["+ppathcounter+"]);"
        outstr+="return false;\">"+getdata.item().Name+"</a></div>";
        ppathcounter++;
      }
    }
   subfolfil="找到"+fcount+"個文件夾,";
   fcount=0;
   ffile=fso.GetFolder(pathstr).Files;
   getdata=new Enumerator(ffile);
   outstr+="</div></div><div class='showcon'>文&nbsp;&nbsp件:[<a href='' onclick=\"return unfurlorfold('filshow',this);\">隱藏</a>]<div id='filshow'>";
   for(;!getdata.atEnd();getdata.moveNext())
    {
     attribu=getdata.item().Attributes;
     if(hidestate||attribu==0||attribu==1||attribu==32||attribu==33)
      {
        fcount++;
        outstr+="<div><a href=\""+currentdrive+"\" target='_blank'>"+getdata.item().Name+"</a></div>";
      }
    } 
   outstr+="</div></div>";
   subfolfil+=fcount+"個文件.";
   document.getElementById("showcontent").innerHTML=outstr;
   document.getElementById("currentdrive").innerText=currentdrive;
   document.getElementById("showdriveatt").innerText=att;
   att="文件夾名稱:\n\n文件夾大小:\n創(chuàng)建時間:\n\n修改時間:\n\n訪問時間:\n\n";
   document.getElementById("showfolderatt").innerText=att;
   document.getElementById("subfolfil").innerText=subfolfil;
   att="[<a href=\""+currentdrive+"\" target='_blank'>打開</a>]";
   att+="[<a href='' onclick=\"addfav();return false;\">收藏</a>]";
   document.getElementById("openfol").innerHTML=att;
   document.getElementById("showorhide").focus();
   getdata="";
   }catch(errorinf){alert(errorinf.description+"\n\n請不要隨便改變數(shù)據(jù)文件*.ini文件中的內(nèi)容.");}
}
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<1 && sizesign=="MB") ? (totalsize=totalsize*Math.pow(2,10),sizesign="KB"):{}
     totalsize=Math.round((totalsize)*100)/100+sizesign;
     att+="文件夾名稱:\n"+fol.Name+"\n文件夾大小:"+totalsize+"\n創(chuàng)建時間:\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請不要隨便改變數(shù)據(jù)文件*.ini文件中的內(nèi)容.");}
}
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="<div class='showcon'>文件夾:[<a href='' onclick=\"return unfurlorfold('folshow',this);\">隱藏</a>]<div id='folshow'>";
   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+="<div><a href='' onClick=\"folderactive(ppath["+ppathcounter+"]);"
        outstr+="return false;\">"+getdata.item().Name+"</a></div>";
        ppathcounter++;
      }
    }
   subfolfil="找到"+fcount+"個文件夾,";
   fcount=0;
   ffile=fso.GetFolder(currfolder).Files;
   getdata=new Enumerator(ffile);
   outstr+="</div></div></div><div class='showcon'>文&nbsp;&nbsp件:[<a href='' onclick=\"return unfurlorfold('filshow',this);\">隱藏</a>]<div id='filshow'>";
   for(;!getdata.atEnd();getdata.moveNext())
    {
     attribu=getdata.item().Attributes;
     if(hidestate||attribu==0||attribu==1||attribu==32||attribu==33)
      {
        fcount++;
        if(openfromfav==0)
          outstr+="<div><a href=\""+currentdrive+"\" target='_blank'>"+getdata.item().Name+"</a></div>";
        else
          outstr+="<div><a href=\""+currentdrive+"\\"+getdata.item().Name+"\" target='_blank'>"+getdata.item().Name+"</a></div>";
      }
    }   
   outstr+="</div></div>";  
   subfolfil+=fcount+"個文件.";
   document.getElementById("showcontent").innerHTML=outstr;
   document.getElementById("currentdrive").innerText=currentdrive;
   att="文件夾名稱:\n\n文件夾大小:\n創(chuàng)建時間:\n\n修改時間:\n\n訪問時間:";
   document.getElementById("showfolderatt").innerText=att;
   document.getElementById("subfolfil").innerText=subfolfil;
   att="[<a href=\""+currentdrive+"\" target='_blank'>打開</a>]";
   att+="[<a href='' onclick=\"addfav();return false;\">收藏</a>]";
   document.getElementById("openfol").innerHTML=att;
   getdata="";
   openfromfav=0;
  }catch(errorinf){alert(errorinf.description+"\n\n請不要隨便改變數(shù)據(jù)文件*.ini文件中的內(nèi)容.");}
}
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("驅(qū)動器根目錄.");
}
function flashdrive()
{
  folderactive(currentdrive);
}
function openfav()
{
   lastfav="";
   var outstr="",i=0;
   for(i;i<favcounter;i++)
    {
      outstr+="<a id='fav"+i+"' href='' onclick=\"openfromfav=1;folderactive(favorite["+i+"]);"
      outstr+="favactive(this.id);return false;\" target='_blank'>"+favorite[i].replace(/^.+\\/,"")+"</a><br>";
    }
   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<favcounter;i++)
     {
       if(favorite[i]==currentdrive)
         {
            alert("常用文件夾中已經(jīng)存在該文件夾.");
            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請不要隨便刪除數(shù)據(jù)文件*.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<favcounter;j++)
          favorite[j]=favorite[j+1];
        for(j=0;j<favcounter;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請不要隨便刪除數(shù)據(jù)文件*.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;  
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>FileLookThroughAdmin V1.0</title>
<style type="text/css">
<!--
body{
background-color:#EEEEEE;}

div.main{
background-color:#CCCCCC;
width:100%;
padding:6px 10px 10px;}

h1{font-size:36px;
font-family:"華文彩云";
color:#0000FF;}

hr{
width:95%;
text-align:left;}

table.tableclass{
table-layout:fixed;
word-wrap:break-word;
width:100%;
font-size:12px;
background-color:#EEEEEE;}
table.tableclass td{
background-color:#CCCCCC;}

#drive{}
td.drvinf{
vertical-align:top;
padding:5px;}
td.folderfile{
height:430px;
vertical-align:top;}
td.folderfile div.showcon{
width:100%;}
td.folderfile div.showcon div div{
padding:1px 0px;
width:49%;
float:left;}

a:link{text-decoration:none;
color:#0000FF;}
a:active{text-decoration:none;
color:#0000FF;}
a:visited{text-decoration:none;
color:#0000FF;}
a:hover{
text-decoration:underline;
color:#FF0000;
background-color:#FFFFDD;}

.button{
border:none;
height:20px;
width:50px;
background-color:#CCCCCC;}

td.fav{
vertical-align:top;
padding:5px;}
-->
</style>
</head>
<body onLoad="javascript:initdoc();status='FileLookThroughAdmin V1.0';">
<div class="main">
  <h1>FileLookThroughAdmin</h1>
  <div style="margin-top:-36px;"><hr></div>
  <div style="margin-top:-14px;position:relative;left:5%;"><hr></div>
  <div>
    <table class="tableclass">
      <tr align="center">
        <td width="18%">收藏夾</td>
        <td width="60%">文件夾及文件</td>
        <td>相關(guān)信息</td>
      </tr>
      <tr>
        <td align="center">
          HardDrives>>
        </td>
        <td colspan="2">
          <div id="drives"></div>
        </td>
      </tr>
      <tr>
        <td align="center">
          Tag>>
        </td>
        <td align="center" colspan="2">
          DisplayContent
        </td>
      </tr>
      <tr>
        <td align="center">
          CurrentPath>>
        </td>
        <td colspan="2">
          <div id="currentdrive"></div>
        </td>
      </tr>
      <tr>
        <td class="fav">
          <div>常用文件夾:</div>
          <div id="showfavorite"></div>
        </td>
        <td rowspan="2" class="folderfile">
          <div onclick="upfile();" style="height:15px;cursor:pointer;padding-top:5px;" align="center"
           onmouseover="this.style.backgroundColor='#FFFFDD';"
           onmouseout="this.style.backgroundColor='#CCCCCC';">
          上一級目錄</div>
          <div id="showcontent" style="padding-left:5px;"></div>
        </td>
        <td rowspan="2" class="drvinf">
          <font color="#FF0000">當(dāng)前驅(qū)動器信息:</font>
          <div id="showdriveatt"></div>
          <font color="#FF0000">當(dāng)前文件夾信息:</font>
          <span id="openfol"></span>
          <div id="showfolderatt"></div>
          <div id="subfolfil" style="color:#FF0000;"></div>
        </td>
      </tr>
      <tr>
        <td class="fav">
          <div>刪除常用文件夾:</div><br>
          <div align="center">
            P:<input id="delfav" type="text" style="border:none;" readonly><br><br>
            [<a href="" onClick="delfav();return false;">執(zhí)行刪除</a>]
          </div>
        </td>
      </tr>
    </table>
  </div>
</div>
<div>
  <font style="font-size:12px;cursor:default;" color="#666666" onmouseover="this.color='#FF0000'" onmouseout="this.color='#666666'">
    Design:sgw.LKing(∮LKing♂)[FS:Ecjtu2006|QQ:28857496|E-Mail:sgw.lking@gmail.com][@06.11]
  </font>
</div>
</body>
</html>

相關(guān)文章

  • JavaScript基于對象方法實現(xiàn)數(shù)組去重及排序操作示例

    JavaScript基于對象方法實現(xiàn)數(shù)組去重及排序操作示例

    這篇文章主要介紹了JavaScript基于對象方法實現(xiàn)數(shù)組去重及排序操作,涉及javascript基于對象方法的數(shù)組遍歷、比較、去重、排序等相關(guān)操作技巧,需要的朋友可以參考下
    2018-07-07
  • 令按鈕懸浮在(手機)頁面底部的實現(xiàn)方法

    令按鈕懸浮在(手機)頁面底部的實現(xiàn)方法

    下面小編就為大家?guī)硪黄畎粹o懸浮在(手機)頁面底部的實現(xiàn)方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-05-05
  • 原生js自定義右鍵菜單

    原生js自定義右鍵菜單

    這篇文章主要為大家詳細介紹了原生js自定義右鍵菜單,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2021-09-09
  • JS與jQ讀取xml文件的方法

    JS與jQ讀取xml文件的方法

    本文通過代碼實例給大家講解js讀取xml文件及jq讀取xml文件的方法,對本文感興趣的朋友一起學(xué)習(xí)吧
    2015-12-12
  • js的2種繼承方式詳解

    js的2種繼承方式詳解

    這篇文章主要介紹了javascript的2種繼承方式,分析對象冒充和原型鏈方式的不同,需要的朋友可以參考下
    2014-03-03
  • highcharts.js數(shù)據(jù)綁定方式代碼實例

    highcharts.js數(shù)據(jù)綁定方式代碼實例

    這篇文章主要介紹了highcharts.js數(shù)據(jù)綁定方式代碼實例,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下
    2019-11-11
  • eval的兩組性能測試數(shù)據(jù)

    eval的兩組性能測試數(shù)據(jù)

    最近對eval火爆的討論,教主 @Franky 和 灰大 @otakustay 也給了精彩的數(shù)據(jù)分析,剛好之前也做過類似的測試,我也跟風(fēng)湊個熱鬧,提供兩組數(shù)據(jù)供大家參考
    2012-08-08
  • JavaScript高級教程5.6之基本包裝類型(詳細)

    JavaScript高級教程5.6之基本包裝類型(詳細)

    在基本類型當(dāng)中,有三種類型是我們經(jīng)常使用的:boolean,number,string,通過本篇文章給大家介紹javascript高級教程5.6之基本包裝類型,感興趣的朋友一起學(xué)習(xí)吧
    2015-11-11
  • el-date-picker與el-time-picker的時間格式設(shè)置代碼

    el-date-picker與el-time-picker的時間格式設(shè)置代碼

    這篇文章主要介紹了el-date-picker與el-time-picker的時間格式設(shè)置代碼,代碼簡單易懂,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友參考下吧
    2023-11-11
  • Canvas實現(xiàn)數(shù)字雨和放大鏡效果的代碼示例

    Canvas實現(xiàn)數(shù)字雨和放大鏡效果的代碼示例

    這篇文章主要介紹了如何Canvas實現(xiàn)數(shù)字雨和放大鏡效果,文中有完整的代碼示例,文章通過代碼介紹的非常清楚,感興趣的小伙伴跟著小編一起來看看吧
    2023-07-07

最新評論

怀远县| 咸阳市| 泽普县| 博湖县| 庆安县| 中方县| 永丰县| 六盘水市| 四川省| 子洲县| 久治县| 塘沽区| 平泉县| 汤阴县| 双鸭山市| 浦城县| 淮安市| 万山特区| 罗田县| 兰坪| 枣阳市| 日照市| 东港市| 五华县| 白水县| 广德县| 鲁山县| 饶平县| 汶川县| 志丹县| 阿拉善右旗| 宽甸| 随州市| 岗巴县| 山东省| 清丰县| 曲阳县| 盐山县| 娱乐| 离岛区| 来安县|