|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
微软什么都提供了。你可以试想一下,如果你是新手,你是希望你点一下按钮程序就能运行那,还是想自己一点一点的组织结构,然后打包发部,调错再打包......javascript|js|导航<!--Tree.jsp-->
<%@pagecontentType="text/html;charset=gb2312"%>
<%@pageimport="java.util.*;"%>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
<HTML>
<HEAD>
<TITLE>NewDocument</TITLE>
<METANAME="Generator"CONTENT="EditPlus">
<METANAME="Author"CONTENT="">
<METANAME="Keywords"CONTENT="">
<METANAME="Description"CONTENT="">
</HEAD>
<BODY>
<iframewidth="100%"height="100"id="hiddenframe"></iframe>
<script>
functionExpandNode(ParentNode,ParentId){
varNodeX=eval(ParentNode.id+_0);
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>
<TABLEborder="1"width="20%"height="60%">
<TR>
<TD>
<DIVstyle="OVERFLOW:auto;WIDTH:100%;HEIGHT:100%">
<TABLEwidth="300%">
<TR>
<TD>
<%
java.lang.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//java.sql.ConnectionConnectionX=java.sql.DriverManager.getConnection("jdbc:ODBC:driver={MicrosoftAccessDriver(*.mdb)};DBQ=D:ResindocexamplesTree ree.mdb","admin","");
//java.sql.StatementStatementX=ConnectionX.createStatement();
java.sql.ResultSetResultSetX=java.sql.DriverManager.getConnection("jdbc:ODBC:driver={MicrosoftAccessDriver(*.mdb)};DBQ=e:
esin-2.1.6docexamplesTree ree.mdb","admin","").createStatement().executeQuery("select*,(selectcount(*)fromtreewhereparentid=T.id)aschildrenfromtreeTwhereparentid=0");
inti=0;
intchildren;
intID;
while(ResultSetX.next())
{
children=ResultSetX.getInt("children");
ID=ResultSetX.getInt("id");
%>
<divid=Node_<%=i%>><ahref=#
<%if(children>0)
{%>
<%}%>
>
<%=ResultSetX.getString("remark")%></a>
</div>
<divid=Node_<%=i%>_0style=display:noneloaded=no>
正在加载...
</div>
<%
i++;
}
%>
</BODY>
</HTML>
<!--SubTree.jsp-->
<%@pagecontentType="text/html;charset=gb2312"%>
<%@pageimport="java.util.*;"%>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
<HTML>
<HEAD>
<TITLE>NewDocument</TITLE>
<METANAME="Generator"CONTENT="EditPlus">
<METANAME="Author"CONTENT="">
<METANAME="Keywords"CONTENT="">
<METANAME="Description"CONTENT="">
</HEAD>
<%
StringParentNode=request.getParameter("PNode");
inti;
intj;
StringnSpace="";
j=ParentNode.length()-ParentNode.replaceAll("_","").length();
for(i=0;i<j;i++)
nSpace=nSpace+"";
StringsHTML="";
i=0;
java.lang.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//java.sql.ConnectionConnectionX=java.sql.DriverManager.getConnection("jdbc:ODBC:driver={MicrosoftAccessDriver(*.mdb)};DBQ=D:ResindocexamplesTree ree.mdb","admin","");
//java.sql.StatementStatementX=ConnectionX.createStatement();
java.sql.ResultSetResultSetX=java.sql.DriverManager.getConnection("jdbc:ODBC:driver={MicrosoftAccessDriver(*.mdb)};DBQ=e:
esin-2.1.6docexamplesTree ree.mdb","admin","").createStatement().executeQuery("select*,(selectcount(*)fromtreewhereparentid=T.id)asChildrenfromtreeTwhereparentid="+request.getParameter("PID"));
intchildren;
intID;
while(ResultSetX.next())
{children=ResultSetX.getInt("children");
ID=ResultSetX.getInt("id");
sHTML=sHTML+"<divid="+ParentNode+"_"+(i+1)+">"+nSpace+"<ahref=#";
if(children>0)
sHTML=sHTML+">+";
elsesHTML=sHTML+">-";
sHTML=sHTML+"</a>
"+"<ahref=#";
if(children>0)
sHTML=sHTML+"";
sHTML=sHTML+">"+ID+":"+ResultSetX.getString("remark")+"</a></div>";
if(children>0)
sHTML=sHTML+"<divid="+ParentNode+"_"+(i+1)+"_0style=display:noneloaded=no>"+nSpace+"正在加载...</div>";
%>
<%i++;
}%>
<BODY>
<script>
varx=eval(parent.+<%=ParentNode+"_0"%>);
x.innerHTML="<%=sHTML%>";
</script>
</BODY>
</HTML>
ruby里有这些工具吗?又要简单多少?我没有用过这两门语言,我估计在这些语言力没有很统一的这种标准,或者根本就没有提供。 |
|