当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·上海考scjp到哪里报名    »显示摘要«
    摘要: 小弟java学得还不错,最近很想去考scjp,但又不想参加培训,只想报个名,然后直接去考。请上海的大虾指点一下。 ......
 ·有谁救救我    »显示摘要«
    摘要: 我在运行的时候总出现这个错误提示,为什么? 对注册表项 hkey_classes_root\inputdata.loaddata 的访问被拒绝。 说明: 执行当前 web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: system.unauthorizedaccessexception: 对注册表项 hkey_clas......


各位都是用什么实现树结构JTree还是 JavaScript

RT.

NO.1   作者: xqi8

<html>  
   
  <head>  
   
  <title>tree</title>  
    <SCRIPT   language=JavaScript>    
  NS4   =   (document.layers)   ?   1   :   0;    
  IE4   =   (document.all)   ?   1   :   0;    
  ver4   =   (NS4   ||   IE4)   ?   1   :   0;    
   
  if   (ver4)   {    
  with   (document)   {    
  write("<STYLE   TYPE=text/css>");    
  if   (NS4)   {    
  write(".parent   {position:absolute;   visibility:visible}");    
  write(".child   {position:absolute;   visibility:visible}");    
  write(".regular   {position:absolute;   visibility:visible}")    
  }    
  else   {    
  write(".child   {display:none}")    
  }    
  write("</STYLE>");    
  }    
  }    
   
  function   getIndex(el)   {    
  ind   =   null;    
  for   (i=0;   i<document.layers.length;   i++)   {    
  whichEl   =   document.layers[i];    
  if   (whichEl.id   ==   el)   {    
  ind   =   i;    
  break;    
  }    
  }    
  return   ind;    
  }    
   
  function   arrange()   {    
  nextY   =   document.layers[firstInd].pageY   +document.layers[firstInd].document.height;    
  for   (i=firstInd+1;   i<document.layers.length;   i++)   {    
  whichEl   =   document.layers[i];    
  if   (whichEl.visibility   !=   "hide")   {    
  whichEl.pageY   =   nextY;    
  nextY   +=   whichEl.document.height;    
  }    
  }    
  }    
   
  function   initIt(){    
  if   (!ver4)   return;    
  if   (NS4)   {    
  for   (i=0;   i<document.layers.length;   i++)   {    
  whichEl   =   document.layers[i];    
  if   (whichEl.id.indexOf("Child")   !=   -1)   whichEl.visibility   =   "hide";    
  }    
  arrange();    
  }    
  else   {    
  divColl   =   document.all.tags("DIV");    
  for   (i=0;   i<divColl.length;   i++)   {    
  whichEl   =   divColl(i);    
  if   (whichEl.className   ==   "child")   whichEl.style.display   =   "none";    
  }    
  }    
  }    
   
  function   expandIt(el)   {    
  if   (!ver4)   return;    
  if   (IE4)   {    
  whichEl   =   eval(el   +   "Child");    
  if   (whichEl.style.display   ==   "none")   {    
  whichEl.style.display   =   "block";    
  }    
  else   {    
  whichEl.style.display   =   "none";    
  }    
  }    
  else   {    
  whichEl   =   eval("document."   +   el   +   "Child");    
  if   (whichEl.visibility   ==   "hide")   {    
  whichEl.visibility   =   "show";    
  }    
  else   {    
  whichEl.visibility   =   "hide";    
  }    
  arrange();    
  }    
  }    
  onload   =   initIt;    
  </SCRIPT>  
  <base   target="main">  
  </head>  
   
  <body>  
                      <table   border="0"   width="92">  
                              <tr>  
                                  <td   width="82">  
                                  <table   border="0"   width="222"   height="217">  
                              <tr>  
                                  <TD   vAlign=top   bgColor=#f7fff7   width="216"   height="211">                        
   
  <DIV   class=parent   id=KB0Parent><A    
                          onclick="expandIt(KB0);   return   false"    
                          href="http://www.tqbooks.com/#"><IMG   height=22    
                          src="plus1.gif"   width=20    
                          border=0>JAVA</A></DIV>  
                          <DIV   class=child   id=KB0Child   style="width:   110;   height:   156">&nbsp;<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                                                  href="http:">J2SE</A><BR>  
                                                      &nbsp;<IMG    
                          height=15   src="plus2.gif"   width=15><A    
                          href="http:">J2EE/EJB</A><BR>&nbsp<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                                                  href="http:">JSP</A><BR>&nbsp;<IMG    
                          height=15   src="plus2.gif"   width=15><A    
                          href="http:"></A>J2ME<BR>  
                                                      &nbsp;<IMG    
                          height=15   src="plus2.gif"   width=15><A    
                          href="http:">设计模式</A><BR>  
                          &nbsp;<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                          href="http:">SUN   JAVA</A><BR>    
                          &nbsp;<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                                                  href="http:">非技术区</A></DIV>  
   
                      <DIV   class=parent   id=KB1Parent><A    
                          onclick="expandIt(KB1);   return   false"    
                          href="http://www.tqbooks.com/#"><IMG   height=22    
                          src="plus1.gif"   width=20    
                          border=0>DELGHI</A></DIV>  
                          <DIV   class=child   id=KB1Child   style="width:   110;   height:   156">&nbsp;<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                                                  href="http:">基础类</A><BR>  
                                                      &nbsp;<IMG    
                          height=15   src="plus2.gif"   width=15><A    
                          href="http:">非技术区</A><BR>&nbsp<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                                                  href="http:">DATABASE</A><BR>  
                                                      &nbsp;<IMG    
                          height=15   src="plus2.gif"   width=15><A    
                          href="http:"></A>GAME<BR>  
                                                      &nbsp;<IMG    
                          height=15   src="plus2.gif"   width=15><A    
                          href="http:">VCL</A><BR>  
                                                      &nbsp;<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                          href="http:">网络编程</A><BR>  
                                                      &nbsp;<IMG   height=15    
                          src="plus2.gif"   width=15><A    
                                                  href="http:">图形处理</A>  
                                                  </DIV>  
   
                      </TD></tr>  
                          </table>  
                      </body>  
  </html>

NO.2   作者: glucose

Fash   template非常简单  
  选择new   from   template  
  选择menus  
  修改XML文件即可得到自己的树状菜单


    摘要: 绝对路径的快捷方式在很多情况下不可用 有办法创建相对路径的快捷方式吗? 谢谢!!! ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE