一个页面中包含两个iframe,左边和右边,两个iframe分别包含两个页面,如何在左边的iframe包含的页面中点击打开右边的iframe包含的页面?现在一点击就把整个页面变成右边的页面内容了,如何点击左边的页面改变右边的页面,而左边的内容不变?
------解决方案--------------------
如果是提交左侧iframe的页面在右侧iframe显示数据可以这样
- HTML code
<iframe name="frame1"><form action="" .... [color=#FF0000]target="frame2"[/color]</ifram><iframe name="frame2"></frame>
------解决方案--------------------
------解决方案--------------------
在左边的iframe中的页面中写下你想打开页面的链接
<a href="test.html" target="右边iframe的名称">在右边页面显示本页面</a>
------解决方案--------------------
dtree支持,add的时候,把target加进去即可,给你个例子:
- Java code
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); } }