代码:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>s:tree的使用</title>
<s:head theme="ajax"/>
</head>
<body>
<H3>s:tree的使用</H3>
<s:tree label="计算机图书" theme="ajax" id="book" showGrid="true"
showRootGrid="true" treeSelectedTopic="tree selected">
<s:treenode theme="ajax" label="李刚" id="ligang">
<s:treenode theme="ajax" label="Jsp study" id="jsp"></s:treenode>
<s:treenode theme="ajax" label="java study" id="java"></s:treenode>
<s:treenode theme="ajax" label="php study" id="php"></s:treenode>
</s:treenode>
<s:treenode theme="ajax" label="张三" id="zhangsan">
<s:treenode theme="ajax" label="test study" id="test1"></s:treenode>
<s:treenode theme="ajax" label="test study" id="test2"></s:treenode>
<s:treenode theme="ajax" label="test study" id="test3"></s:treenode>
</s:treenode>
<s:treenode theme="ajax" label="李四" id="lisi">
<s:treenode theme="ajax" label="Jsp study" id="test4"></s:treenode>
<s:treenode theme="ajax" label="java study" id="test5"></s:treenode>
<s:treenode theme="ajax" label="php study" id="test6"></s:treenode>
</s:treenode>
</s:tree>
</body>
</html>