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

2019-06-03 14:49:49王振洲

         }
     }
   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+"nn请不要随便删除数据文件*.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+"nn请不要随便删除数据文件*.ini文件.");}
}
function unfurlorfold(objid,obj)
{
  if(obj.innerText=="隐藏")
     {
       obj.innerText="显示";
       document.getElementById(objid).style.display="none";
     }
  else