打印本文 打印本文  关闭窗口 关闭窗口  
Dreamweaver下使用ASP+Access编写目录树
作者:佚名  文章来源:不详  点击数  更新时间:2008/4/18 14:55:26  文章录入:杜斌  责任编辑:杜斌

  利用Access创建数据库listBase.mdb:

  数据表:listTable

  数据字段:listIdlistNamelistInfoparentId

  连接方法:

  把以上代码保存成文件:initialize.asp

  下面这段程序代码是用来显示目录树用的,保存成文件:inc.asp

  下面这是调用页代码,保存成index.asp

  marginwidth="0" marginheight="0">

  onMouseDown="MM_dragLayer(’addNodeDiv’,’’,

  1,1,300,30,true,false,-1,-1,-1,-1,false,false,0,’’,false,’’)"> 
   
  width="13" height="13" style="cursor:hand" onclick="jscript:addNodeDiv.style.display=’none’;">

  节点名称:

  type="text" class="text1" id="listName">  10个字符BR>

  节点说明:    50个字符

  border="0" cellspacing="0" cellpadding="5">

  type="submit" class="DivBut" id="SubmitBut" value="提交" onclick="jscript:addNodeForm.submit();this.disabled=’disabled’">

  type="button" class="DivBut" id="cancelBut" onclick="jscript:addNodeDiv.style.display=’none’;" value="取消">
  cellpadding="0" cellspacing="0">

  下面是提交信息处理页的代码,保存为disp.asp

  以上代码保存成的文件放在同一目录下面

  (在这里我们称为根目录)。

  在根目录下新建一个CSS目录。

  下面为CSS定义,保存成css.css文件,放在CSS目录下。

  注:有一两个样式是不要的,我没删

  .menuPro {

  border-top: 1px dotted #A5BBE0;

  border-right: 1px dotted #31548E;

  border-bottom: 1px dotted #31548E;

  border-left: 1px dotted #A5BBE0;

  overflow: visible;

  font-family: "Verdana", "Arial", "Helvetica", "sans-serif";

  font-size: 12px;

  }



  .menuGro {

  border-top: 2px outset #31548E;

  border-right: 2px outset #A5BBE0;

  border-bottom: 2px outset #A5BBE0;

  border-left: 2px outset #31548E;

  overflow: visible;

  font-family: "Verdana", "Arial", "Helvetica", "sans-serif";

  font-size: 12px;

  }

  .menuFont {

  font-family: "Verdana", "Arial", "Helvetica", "sans-serif";

  font-size: 12px;

  }

  .showDiv {

  display:’’;

  }

  .hiddenDiv {

  display:none;

  }

  .treeDiv {

  background-color: #A8D5EA;

  height: 100%;

  width: 100%;

  border-top-width: 2px;

  border-right-width: 2px;

  border-bottom-width: 2px;

  border-left-width: 2px;

  border-top-style: inset;

  border-right-style: inset;

  border-bottom-style: inset;

  border-left-style: inset;

  border-top-color: #3680C9;

  border-right-color: #BCD5ED;

  border-bottom-color: #BCD5ED;

  border-left-color: #3680C9;

  overflow: auto;

  padding: 20px;

  }



  body {

  overflow: hidden;

  }

  .formDiv {

  font-family: "Verdana", "Arial", "Helvetica", "sans-serif";

  font-size: 12px;

  font-weight: normal;

  background-color: #7ABDDE;

  height: 200px;

  width: 300px;

  border-top: 1px outset #B9DCFF;

  border-right: 1px outset #004488;

  border-bottom: 1px outset #004488;

  border-left: 1px outset #B9DCFF;

  overflow: hidden;

  }

  .text1 {

  width: 160px;

  }

  .DivBut {

  font-family: "Verdana", "Arial", "Helvetica", "sans-serif";

  font-size: 12px;

  font-weight: normal;

  background-color: #3399CC;

  height: 20px;

  width: 40px;

  border: 1px outset;

  }

  另在根目录下建一个IMAGES目录。用来放那些文件夹样子的小图。

打印本文 打印本文  关闭窗口 关闭窗口