⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multiphasetree.jsp

📁 Web开发的基本框架
💻 JSP
字号:
<%@ taglib uri="/tags/web-tree" prefix="html"%>
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*"%>
<%@ page import="org.loushang.web.taglib.util.skin.SkinUtils"%>
<%@ taglib uri="/tags/web-i18n" prefix="web"%>
<web:js src="xmltree.js"/>
<link rel="stylesheet" type="text/css" href="<%=SkinUtils.getCSS(request,"XMLSelTree.css")%>">
<%
		HashMap hash = new HashMap();
		ArrayList list = new ArrayList();		
		hash.put("id", "1");
		hash.put("color","#33FF33");
		hash.put("property", "我订阅的版");
		hash.put("isLast","1");
		list.add(hash);
		
		hash = new HashMap();
		hash.put("id", "2");
		hash.put("property", "销售中心");
		hash.put("isLast","0");
		list.add(hash);	
			
		hash = new HashMap();
		hash.put("id", "3");
		hash.put("property", "技服中心");
		hash.put("isLast","0");
		list.add(hash);	
			
		hash = new HashMap();
		hash.put("id", "4");
		hash.put("property", "设计中心");
		hash.put("isLast","1");		
		list.add(hash);
		
		request.setAttribute("tree",list);		
%>
<html>
<head>
<title></title>
<style>
td{font-size:9pt}
.tdContrast{border-bottom:1px solid #6699cc;}
.Contrast{background-color:#dddddd}
</style>
</head>

<table width="100%">
<tr>
<td><label class="title">树组件例子</label></td>
<% String file=request.getServletPath().substring(1);
   String app=request.getContextPath();
%>
<td><label class="title">url:<%=file%></label></td>
<td align="right" valign="bottom" nowrap>&nbsp;[<a href="<%=app%>/src.jsp?target=<%=file %>" target="source">源代码</a>]&nbsp;</td>
</tr>
</table>
<hr>
<table>
<tr>
<td><input type=button value="取当前节点的路径" onclick="alert(xmlTree.makeNodePId())"></td>
<td><input type=button value="取当前节点的父节点和值" onclick="alert(xmlTree.getParentNodeId()+' , '+xmlTree.getParentNodeValue())"></td>
<td><input type=button value="取当前节点和节点值" onclick="alert(xmlTree.getCurrentNodeId()+' , '+xmlTree.getCurrentNodeValue())"></td>
</tr>

</table>
<body leftmargin="10" topmargin="10" scroll="auto" oncontextmenu="return false;">
	<html:tree text="多阶段取数据例子" style="height:300;width:500" openFlag="NodeImg2.gif" type="type" checkStyle="0" closeFlag="NodeImg1.gif" urlImage="NodeImg2.gif" id="-1" name="xmlTree" openAction="false" root="true">
	  	<html:node nodeType="isLast" id="id" property="property" collection="tree" value="id#property">
	    </html:node>
	</html:tree>
</body>
</html>

<script language=javascript>
xmlTree.clicktext=function (oThis) 
{   
}
//读取节点的子节点数据
xmlTree.clickimg = function (oThis)
{
  	oThis.ref="getxml.jsp?PARANTID="+oThis.id;
}
xmlTree.dbclicktext = function(oThis)
{    
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -