日期:2014-05-17  浏览次数:20824 次

dtree的问题
单独练习一个dtree没出现问题,但是加在我的项目中之后就出现这个问题啦!看看有没有懂的?
单独的练习:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link rel="StyleSheet" href="dtree.css" type="text/css" />
<script type="text/javascript" src="dtree.js"></script>
</head>

<body>
<div class="dtree">

<p>
<a href="javascript: d.openAll();">open all</a> |
<a href="javascript: d.closeAll();">close all</a>
</p>

<script type="text/javascript">
d = new dTree('d');

d.add(0,-1,'My example tree');
d.add(1,0,'手机');
d.add(2,0,'电脑');
d.add(3,1,'摩托罗拉');
d.add(4,0,'IPAD');
d.add(5,3,'ME860');
d.add(6,5,'ME860-1');
d.add(7,0,'Node 4');
d.add(8,1,'诺基亚');
d.add(9,0,'My Pictures','','Pictures I\'ve taken over the years','','','img/imgfolder.gif');
d.add(10,9,'The trip to Iceland','','Pictures of Gullfoss and Geysir');
d.add(11,9,'Mom\'s birthday');
d.add(12,0,'Recycle Bin','','','','img/trash.gif');
d.add(13,2,'联想');
d.add(14,2,'宏基');
d.add(15,4,'ipad1');
d.add(16,4,'ipad2');
d.add(17,7,'nothing');
document.write(d);
</script>

</div>
</body>
</html>
我的项目中的:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
   
  <title>My JSP 'addGroupMainView.jsp' starting page</title>
   
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link rel="StyleSheet" href="dtree.css" type="text/css" />
<script type="text/javascript" src="dtree.js"></scr