日期:2014-05-18  浏览次数:20727 次

100分求助,jbuilder2006调试错误
一个类似CSDN的导航树
以下是源程序:
<%@   page   contentType= "text/html;   charset=GBK "   %>
<%@   page   errorPage= "guidetree_error.jsp "   %>
<%@   taglib   uri= "http://java.sun.com/jsp/jstl/fmt "   prefix= "fmt "   %>
<%@   taglib   uri= "http://java.sun.com/jsp/jstl/sql "   prefix= "sql "   %>
<%@   taglib   uri= "http://java.sun.com/jsp/jstl/xml "   prefix= "x "   %>

<%@   page   language= "java "   import= "java.util.*,java.lang.*,java.sql.* "   pageEncoding= "UTF-8 "%>
<%@   page   import= "guidetree.Tree "%>
<%@page   import= "Tree.class "   %>


<html>
<head>
<title> 树状菜单导航 </title>
</head>
<body>
<script   language= "JavaScript "   type= "text/javascript ">
<!--这段js为了实现树的展开和关闭的效果-->
<!--
function   myClick(id)   {
  eval( "var   div=div "+id);
  eval( "var   img=img "+id);

  div.style.display=div.style.display!= "none "? "none ": "block ";
  if(img.src.indexOf( "arrow.gif ")==-1){
  img.src=div.style.display!= "none "? "img/minus.gif ": "img/plus.gif ";
  }
 

  img.alt=div.style.display!= "none "? "关闭 ": "展开 ";
 
 
  <!--   动态的只显示一层开始-->
 
  var   arr=document.getElementsByTagName( "div ");
  var   pa=document.getElementById( "div "+id).pa;
  if(pa== "0 "){
  pa=id;
  }
  pa= ", "+pa+ ", "+id+ ", ";
 
  for(i=0;i <arr.length;i++){
if(arr[i].id!=null&&arr[i].id!= " "){
var   iid=arr[i].pa.substr(arr[i].pa.substr(arr[i].pa.lastIndexOf( ", ")-1));

  if(pa.indexOf( ", "+iid+ ", ")> -1){
  }else{  
  arr[i].style.display= "none ";
 
  }
  }
  }
  <!--动态的只显示一层结束-->
 
 
 
}
function   myClick1(id)   {
  document.form1.parentid.value=id;
}
//-->
</script>
<table>
<tr>
<td   height= "300 "   valign= "top ">
                                <%try
                              {
                                      Tree   myTree=new   Tree();
                                      myTree.init(out,   request);
                              &