top按钮OnClick()事件,如DoClickEvent()
<script language="javascript">
function DoClickEvent() {
  // 处理一些数据
  // main部分加载一个页面(3.aspx)
  parent.main.location = "3.aspx";
}
</script>

解决方案 »

  1.   

    function DoClickEvent()
    {
    .....
    top.frames.item("main").location = "3.aspx";//保守一点建议这样写
    //或
    top.frames["main"].location = "3.aspx";
    //根据具体环境 top 换成 parent也可以
    }还有frame的name最好不要定义成"top"容易造成冲突 比如你在main里调用top里面的内容
    parent(top).top.location 这样的写法是错误的
    parent(top).frames["top"].location 这样的写法才正确
    为防止万一还是尽量不要把frame的name设定成top,parent,opener..等