CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  HTML(CSS)

挑战高手

楼主erlengzi2003(二愣子)2004-04-04 11:21:15 在 Web 开发 / HTML(CSS) 提问

题目:  
          在网页中制作一个像本论坛左边树型目录的可视化效果,每一个层次都有描叙,描叙的内容对应数据库中按照层次存储的数据,   不同点是可以进行每一个层面上的选择功能,就像安装OFFICE的时候提示要选择需要安装的组件功能一样!  
   
  谈谈给出设计方案  
  问题点数:100、回复次数:7Top

1 楼fason(咖啡人生)回复于 2004-04-04 11:53:47 得分 20

http://fason.nease.net/samples/xtree/index.htm?checkbox=trueTop

2 楼wanghr100(灰豆宝宝.net(努力工作))回复于 2004-04-04 14:20:01 得分 20

liuruhong(蓝色街灯)  
  http://blog.heiyou.com/d/newtree.zip  
  Top

3 楼erlengzi2003(二愣子)回复于 2004-04-04 17:43:25 得分 0

感谢以上两位给我提供的参照。但是现在的情况是,不能够使用XML技术,还有什么其他的解决方案吗?Top

4 楼threezxw()回复于 2004-04-05 08:56:29 得分 0

用alter试一试。也许可以实现你说的。Top

5 楼lions911(--Administrator--)回复于 2004-04-05 13:09:20 得分 20

树有很多种,不用XML的也很多啊!!  
   
  <!--#include   file="conn.asp"-->  
  <!--#include   file="top.asp"-->  
   
  <html>  
  <head>  
  <title>Untitled   Document</title>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">  
  <link   rel="stylesheet"   href="style.css"   type="text/css">  
   
  <style   type="text/css">  
  <!--  
  .a1   {  
  font-family:   "Verdana",   "Arial",   "Helvetica",   "sans-serif";  
  font-size:   12px;  
  font-style:   normal;  
  }  
  .t1   {   border-bottom:   0px   solid   black;   border-left:   1px   solid   black;   border-right:   1px   solid   black;   border-top:   0px   solid   black;   }    
  .t2   {   border-bottom:   1px   solid   black;   border-left:   1px   solid   black;   border-right:   1px   solid   black;   border-top:   0px   solid   black;   }    
  .bg   {  
  background-image:   url(../images/sub/left.gif);  
  background-repeat:   repeat-y;  
  }  
  -->  
  </style>  
  <script   language="vbscript">  
  <!--  
  sub   doclick()  
          if   (window.event.srcelement.classname="parent")   or   (window.event.srcelement.classname="image")   then  
                  expandcollapse  
          end   if  
          window.event.cancelbubble=true  
  end   sub  
  sub   expandcollapse()  
          dim   objelement  
          dim   objtargetdiv  
          dim   imgicon  
          set   objelement=window.event.srcelement  
                  if   objelement.classname="parent"   then    
                          set   objtargetdiv=objelement.children(1)  
                          set   imgicon=objelement.children(0)  
                  else  
                          set   objtargetdiv=objelement.parentelement.children(1)  
                          set   imgicon=objelement      
                  end   if    
                  if   objtargetdiv.children.length>0   then  
                          if   objtargetdiv.style.display="none"   then    
                                  objtargetdiv.style.display=""  
                                  imgicon.src="images/up.gif"  
                          else  
                                  objtargetdiv.style.display="none"  
                                  imgicon.src="images/next.gif"          
                          end   if    
                  end   if      
  end   sub    
  dim   oldcolor  
  sub   domouseover()  
          if   window.event.srcelement.tagname="A"   then  
                  oldcolor=window.event.srcelement.style.color  
                  window.event.srcelement.style.color="red"  
          else  
                  window.event.cancelbubble=true  
          end   if          
  end   sub                
  sub   domouseout()  
          if   window.event.srcelement.tagname="A"   then  
                  window.event.srcelement.style.color=oldcolor  
          end   if    
          window.event.cancelbubble=true          
  end   sub  
  -->  
  </script>  
   
  </head>  
   
  <body>  
  <div   align="center">  
  <%''''''''''''''''''''''''''''''''''''''''''''''''''''''开始%>  
               
       
       
                                          <form   action="sendmail1.asp"   method="post"   name="form0"   onsubmit="javascript:   return   judgeData();">  
                                              <table   width="100%"   border="0"   cellspacing="8"   cellpadding="0">  
                                                  <tr>    
                                                      <td   width="20%"   align="right"><font   face="Verdana,   Arial,   Helvetica,   sans-serif"   size="2"   color="#006600">〖标题〗    
                                                          </font></td>  
                                                      <td>    
                                                          <input   type="text"   name="title"   class="form_re">  
                                                      </td>  
                                                  </tr>  
                                                  <tr>    
                                                      <td   align="right"><font   face="Verdana,   Arial,   Helvetica,   sans-serif"   size="2"   color="#006600">〖正文〗</font></td>  
                                                      <td>    
                                                          <textarea   name="content"   class="form_re02"></textarea>  
                                                      </td>  
                                                  </tr>  
                                                  <tr>    
                                                      <td   align="right">&nbsp;</td>  
                                                      <td>    
                                                          <input   type="image"   border="0"   name="imageField"   src="images/submit.gif"   width="85"   height="30">  
                                                          <img   src="images/reset.gif"   width="85"   height="20"   hspace="20"   onClick="javascript:reset();">    
                                                      </td>  
                                                  </tr>  
                                                  <tr>  
                                                      <td   align="right"   valign="top"><font   face="Verdana,   Arial,   Helvetica,   sans-serif"   size="2"   color="#006600">〖客户〗</font></td>  
                                                      <td>  
                                                          <table   width=100%>  
                                                           
      <tr>     <td   ><div   onclick="doclick"   onmouseover="domouseover"   onmouseout="domouseout">  
   
  <%  
  cookiename=request.cookies("logonname")  
  cookiename="test1"  
  function   isemail(str)'VBSCRIPT验证是否EMAIL函数  
        if   isnull(str)   then  
              exit   function  
        end   if  
   
        dim   regstr,regex  
        set   regex=New   RegExp  
        regex.pattern="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"  
        isemail=regex.test(str)  
        set   regex=nothing  
  end   function  
  SQL="select   *   from   l_addresslist   where   user_name   is   null   and   u_id='"&cookiename&"'"  
  set   rs=server.CreateObject("ADODB.RecordSet")  
  rs.Open   sql,conn,1,1  
  while   not   rs.EOF    
  %>  
  <div   class="parent">&nbsp;<img   src="images/next.gif"   class="image"   width="11"   height="11">&nbsp;<%=rs.Fields("user_group")%>  
         
         
         
  <div   style="display:none">  
        <%''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''  
  SQL1="select   *   from   l_addresslist   where   user_name   is   not   null   and   user_group="&"'"&rs.Fields("user_group")&"'"&"   and   u_id='"&cookiename&"'"  
  set   rs1=server.CreateObject("ADODB.RecordSet")  
  rs1.Open   sql1,conn,1,1  
  while   not   rs1.EOF    
   
   
  %>  
         
         
         
         
         
         
         
         
  <%if   not   isemail(rs1.Fields("user_email"))   then'判断是否是EMAIL地址%>  
    &nbsp;&nbsp;&nbsp;<input   value=""   type=checkbox   name="mailAdd"   disabled=ture><%=rs1.Fields("user_name")%><br>  
  <%else%>  
          &nbsp;&nbsp;&nbsp;<input   value="<%=rs1.Fields("user_email")%>"   type=checkbox   name="mailAdd"   ><%=rs1.Fields("user_name")%><br>  
  <%end   if%>  
   
         
         
         
         
         
         
         
        <%  
  rs1.MoveNext  
  wend  
  set   rs1=nothing  
  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''%>  
  </div>  
  </div>  
   
   
  <%  
  rs.MoveNext  
  wend  
  set   rs=nothing  
  %>  
  </td></tr>    
  <tr   align="left"><td   colspan=3   align="left">  
  <input   type="checkbox"   name="cmd"   onclick="javascript:selectall();"><b>全选</b><br>&nbsp;<br>  
                                          &nbsp;&nbsp;所有未填写EMAIL地址用户将不会出现在本列表,格式不正确的不能发送。   </td>  
  </tr>  
                                                          </table>  
                                                   
    </td>  
            </tr>  
                                              </table>  
                                          </form>  
                   
   
       
                   
       
  <%'''''''''''''''''''''''''''''''''''''''''''''''''''''''''结束%>  
      </div>  
   
   
   
   
   
   
   
   
   
  </body>  
  </html>  
  <script   language="javascript">  
  function   judgeData(){  
  if(document.form0.title.value==""){  
  alert("请输入邮件标题");  
  document.form0.title.focus();  
  return   false;  
  }  
   
  n   =   parseInt(window.document.form0.elements.length);  
  j=0  
  for   (   i=2   ;i<   n;i   =   i   +   1){  
  if   (window.document.form0.elements[i].checked   ==   true){  
        j   =   j+1;  
  } }  
   
  if   (j==0){  
        alert("请选择要发送email的客户!")  
        return   false  
  }  
   
   
  return   true;  
  }  
   
  function   selectall(){  
    n   =   parseInt(window.document.form0.elements.length);  
  eval("sign   =document.form0.cmd.checked"   )   ;  
  for   (   i=2   ;i<   n;i   =   i   +   1)  
  {  
    if   (window.document.form0.elements[i].disabled   ==   false)  
  window.document.form0.elements[i].checked   =   sign;  
  }  
  }  
  </script>  
  Top

6 楼lions911(--Administrator--)回复于 2004-04-05 17:10:07 得分 20

<html>  
   
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">  
  <title>链接菜单</title>  
  </head>  
  <script   language="vbscript">  
  <!--  
  sub   doclick()  
          if   (window.event.srcelement.classname="parent")   or   (window.event.srcelement.classname="image")   then  
                  expandcollapse  
          end   if  
          window.event.cancelbubble=true  
  end   sub  
  sub   expandcollapse()  
          dim   objelement  
          dim   objtargetdiv  
          dim   imgicon  
          set   objelement=window.event.srcelement  
                  if   objelement.classname="parent"   then    
                          set   objtargetdiv=objelement.children(1)  
                          set   imgicon=objelement.children(0)  
                  else  
                          set   objtargetdiv=objelement.parentelement.children(1)  
                          set   imgicon=objelement      
                  end   if    
                  if   objtargetdiv.children.length>0   then  
                          if   objtargetdiv.style.display="none"   then    
                                  objtargetdiv.style.display=""  
                                  imgicon.src="up.gif"  
                          else  
                                  objtargetdiv.style.display="none"  
                                  imgicon.src="next.gif"          
                          end   if    
                  end   if      
  end   sub    
  dim   oldcolor  
  sub   domouseover()  
          if   window.event.srcelement.tagname="A"   then  
                  oldcolor=window.event.srcelement.style.color  
                  window.event.srcelement.style.color="red"  
          else  
                  window.event.cancelbubble=true  
          end   if          
  end   sub                
  sub   domouseout()  
          if   window.event.srcelement.tagname="A"   then  
                  window.event.srcelement.style.color=oldcolor  
          end   if    
          window.event.cancelbubble=true          
  end   sub  
  -->  
  </script>  
   
  <body>  
  <div   onclick="doclick"   onmouseover="domouseover"   onmouseout="domouseout">  
  <div   class="parent"><img   src="next.gif"   class="image"   width="11"   height="11">方正集团  
        <div   style="display:none">  
        <a   href="11.htm">公司主页</a><br>  
        <a   href="12.htm">公司简介</a><br>  
        <a   href="13.htm">最新产品</a><br>  
        </div>  
  </div>  
  <div   class="parent"><img   src="next.gif"   class="image"   width="11"   height="11">友情链接  
          <div   style="display:none">  
          <a   href="21.htm">中国网学</a><br>  
          <a   href="22.htm">清华大学</a><br>  
          <a   href="23.htm">北京大学</a><br>  
          </div>  
  </div>  
  </div>  
  </body>  
   
  </html>  
  Top

7 楼ssss321()回复于 2004-04-06 10:30:01 得分 20

也许没必要用<DIV>    
  在<table>   或者<TR>中也可以设置style="display:none"样式.这样开始时是隐藏的.当点击时,用javascript代码设置第二层的<table>   或者<TR>中的display属性为block值.这样就可以显示出来了.  
  例:   http://www.yixintoys.com   中的产品类别.  
  Top

相关问题

  • 挑战高手
  • 挑战,113分
  • 挑战极限
  • 挑战VC????
  • ☆☆☆☆☆☆高手?挑战☆☆☆☆☆☆
  • ¥¥¥¥¥¥¥¥挑战DirectX¥¥¥¥¥¥
  • 挑战极限.................
  • 挑战!!word,execl!!!!!
  • 挑战高手
  • 挑战高手

关键词

得分解答快速导航

  • 帖主:erlengzi2003
  • fason
  • wanghr100
  • lions911
  • lions911
  • ssss321

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo