当前位置: 代码迷 >> ASP.NET >> frame 面临有关问题。asp,待!
  详细解决方案

frame 面临有关问题。asp,待!

热度:6978   发布时间:2013-02-26 00:00:00.0
frame 面临问题。asp高手请进,在线等待!!
各位:
我现在有一个main页面,它是有三个页面组成的,上,左,右。T型的结构,FRAME实现的,现在的问题是:一开始载入的时候,右面的是介绍画面,现在我要做的是,点击画面上的一个BUTTON,想把右侧的画面换成别的画面,比如说是管理的画面,上面的和左面的不动,不知道怎么做,请各位高手帮忙,很着急的,在线等待,最好有现成的代码,我是新人,谢谢了!

------解决方案--------------------------------------------------------
<iframe src=Navigate.aspx name= "left " style= "width: 15%; height:100%; "> </iframe>


<iframe name= "right " scrolling= "auto "  style= "width: 85%; height:100%; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; border-top-style: none; padding-top: 0px; border-right-style: none; border-left-style: none; border-bottom-style: none; " id= "IFRAME1 " onclick= "return IFRAME1_onclick() "> </iframe>


<asp:TreeView ID= "TreeView1 " runat= "server " DataSourceID= "navi " OnTreeNodeDataBound= "TreeView1_TreeNodeDataBound " AutoGenerateDataBindings= "False " Height= "468px " Width= "67px ">
<DataBindings>
<asp:TreeNodeBinding DataMember= "address " Text= "管理 " Value= "管理 " />
<asp:TreeNodeBinding DataMember= "scoDish " TextField= "text " Value= "text " Text= "text " />
<asp:TreeNodeBinding DataMember= "rest " />
<asp:TreeNodeBinding Target= "right " DataMember= "item " NavigateUrlField= "value " TextField= "text " />
</DataBindings>
</asp:TreeView>
<asp:XmlDataSource ID= "navi " runat= "server " DataFile= "~/xml/NaviFile.xml "> </asp:XmlDataSource>
------解决方案--------------------------------------------------------
<input type=button onclick=aa()>

<script>
function aa()
{
window.parent.frames[ '.... '].location.href= '...地址 ';
//frames中的....可以指代右侧的画面在整个frames的索引,也可以指代右侧框架name值
}
</script>
------解决方案--------------------------------------------------------
你一开始显示的页面 是右边那个页面
button在右边? 你是点这个按钮 改变 右边的页面?
<input type= "button " onclick= "window.location.href= 'login.aspx ' value= "管理 ">
这样不就得了 你只是改变自己页面的路径
  相关解决方案