知识大全 JSP+JavaScript实现类似MSDN CSDN导航树效果代码

Posted

篇首语:不飞则已,一飞冲天;不鸣则已,一鸣惊人。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 JSP+JavaScript实现类似MSDN CSDN导航树效果代码相关的知识,希望对你有一定的参考价值。

JSP+JavaScript实现类似MSDN CSDN导航树效果代码  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!

  <! Tree jsp > <%@ page contentType ="text/;charset=gb " %> <%@ page import="java util *;" %> <!DOCTYPE HTML PUBLIC " //W C//DTD HTML Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <iframe width= % height= id="hiddenframe"></iframe> <script> function ExpandNode(ParentNode ParentId) var NodeX = eval(ParentNode id + _ ); if (NodeX style display == none )     NodeX style display="block";   if (NodeX loaded == no )            document frames[ hiddenframe ] location replace("subtree jsp?PID=" + ParentId + "&PNode=" + ParentNode id);       NodeX loaded = yes ;       else     NodeX style display= none ;   </script> <CENTER> <TABLE border= width= % height= %> <TR> <TD> <DIV > <TABLE width= %> <TR> <TD> <%  java lang Class forName("sun jdbc odbc JdbcOdbcDriver"); //  java sql Connection ConnectionX = java sql DriverManager getConnection("jdbc:ODBC:driver=Microsoft Access Driver (* mdb);DBQ=D:\\\\Resin\\\\doc\\\\examples\\\\Tree\\\\tree mdb" "admin" ""); //  java sql Statement StatementX = ConnectionX createStatement();  java sql ResultSet ResultSetX = java sql DriverManager getConnection("jdbc:ODBC:driver=Microsoft Access Driver (* mdb);DBQ=e:\\\\resin \\\\doc\\\\examples\\\\Tree\\\\tree mdb" "admin" "") createStatement() executeQuery("select * (select count(*) from tree where parentid = T id) as children from tree T where parentid = ");  int i= ;  int children;  int ID;  while (ResultSetX next())        children=ResultSetX getInt("children"); ID=ResultSetX getInt("id"); %> <div id= Node_<%= i %> ><a #         <% if (children > )               %>                  onClick= ExpandNode(Node_<%= i %> <%=ID %>) >+</a>               <%;             else %>                 > </a><%;%>         <a #         <% if (children > )                 %>                     onDblClick= ExpandNode(Node_<%= i %> <%=ID%>)                 <%  %>                   >                 <%=ResultSetX getString("remark")%></a> </div>          <div id= Node_<%= i %>_ style= display: none loaded= no >         &nbsp;&nbsp;正在加载    </div>  <%  i++;    %> </BODY> </HTML>

  <! SubTree jsp > <%@ page contentType ="text/;charset=gb " %> <%@ page import="java util *;" %> <!DOCTYPE HTML PUBLIC " //W C//DTD HTML Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <% String ParentNode = request getParameter("PNode"); int i; int j; String nSpace=""; j= ParentNode length() ParentNode replaceAll("_" "") length(); for (i= ;i<j;i++)    nSpace = nSpace + "&nbsp;&nbsp;"; String sHTML =""; i= ;

cha138/Article/program/Java/JSP/201311/20522

相关参考

知识大全 jsp 与 javascript 中文cookie交互

   兼容性考虑使用了utf编码测试通过支持IE及Firefox  jsp写入中文Cookie<%@pagecontentType=text/;charset=utfpageEncod

知识大全 jsp+javascript打造级连菜单代码

  <%@pageimport="javautilDateyavafileapp*javasql*;"       &nbs

知识大全 jsp统计在线人数代码

cha138/Article/program/Java/Javascript/201311/25508

知识大全 javascript检测页面是否缩放

cha138/Article/program/Java/JSP/201311/20221

知识大全 解析javascript 浏览器关闭事件

解析javascript浏览器关闭事件cha138/Article/program/Java/JSP/201311/19935

知识大全 javascript和html判断浏览器类型

cha138/Article/program/Java/JSP/201311/19808

知识大全 jquery和javascript的区别(常用方法比较)

cha138/Article/program/Java/JSP/201311/20445

知识大全 javascript检测页面是否缩放的小例子

  复制代码代码如下:cha138/Article/program/Java/JSP/201405/30759

知识大全 效率比较高的jsp分页程序

  可通过下拉框跳转到指定页  <scriptlanguage=javascript>    functiongopage()  

知识大全 javascript实现文字图片上下滚动的具体实例

这篇文章介绍了在JS中文字图片上下滚动的实现代码需要的朋友可以参考一下 复制代码代码如下:cha138/Article/program/Java/JSP/201311/20264