日期:2014-05-17 浏览次数:20740 次
<iframe name="frame1"> <form action="" .... [color=#FF0000]target="frame2"[/color] </ifram> <iframe name="frame2"> </frame>
------解决方案--------------------
private String htmlString = ""; private void showTree(TreeNode rootNode) throws Exception{ String myID = rootNode.getNodeName();//得到本身id if (myID==null||myID.equals("")) throw new Exception("由于数据库连接失败或其他原因,无法取得系统参数树的根节点,请稍后再试!"); String pID = "";//得到父ID if(rootNode.getDepth()==1) //如果是根节点 pID = "-1"; else pID = rootNode.getParentNode().getNodeName(); String viewName = rootNode.getNodeViewName(); String isFolder = "1";//是否显示为文件夹 if(rootNode.isLeafNode()) isFolder = ""; String myUrl = "#";//链接 String title = ""; String target = "mainFrame"; myUrl = "/daSysConfig.do?functionName=QUERYDASYSCONFIG&functionData=" + rootNode.getNodeName(); htmlString += "d.add("; htmlString += myID + ","; htmlString += pID + ","; htmlString += "'" + viewName + "'" + ","; htmlString += "'" + isFolder + "'" + ","; htmlString += "'" + myUrl + "'" + ","; htmlString += "'" + title + "'" + ","; htmlString += "'" + target + "'" + ");\n"; if(!rootNode.hasChildNode()){ return; } ArrayList arrayList_ChildNode = rootNode.getChildNodes(); for(int i=0; i<arrayList_ChildNode.size(); i++) { TreeNode childNode = (TreeNode)arrayList_ChildNode.get(i); showTree(childNode); } }