asp.net iframe框架调用网页

来源:百度知道 编辑:UC知道 时间:2024/05/17 19:08:59
我的main页面是一个上左右三框架的,上面的是top.aspx,左面的是left.aspx,右面的是right.aspx,三个框架的ID分别是“top”“left”“right”,我现在想点击top.aspx中的一个按钮button1,使得左面框架的网页变为aaaaa.aspx,该怎么做?
忘了说了,我用的框架是iframe

应该是:三个框架的NAME分别是“top”“left”“right”,不是ID ,才可以吧。在button1下的代码:
<a href="aaaaa.aspx" target="left">,就可以实现了。试试吧!

<input type="button" runat="server" id="button1" onclick="parent.left.location.href='aaaaa.aspx';">
或者像zhangpeiwen168那样写也可以的.

button1的Click事件下转到aaaaa.aspx页, target为left