topframe页面中的代码:<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<INPUT type="button" value="退出" onclick="judge()">
</BODY>
</HTML>
<SCRIPT LANGUAGE=javascript>
<!--
function judge(){
if (window.confirm("确实要退出么?")){
top.location.href = "login.htm";
}
}
//-->
</SCRIPT>

解决方案 »

  1.   

    同意楼上。
    top.location= "login.htm"; 也可以的
      

  2.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript" type="text/JavaScript">
    function starwu() {
    if (confirm("是否退出?") == true) {
    top.document.location = "login.asp";
    }
    event.returnValue = false;
    }
    </script>
    </head>
    <body>
    <form name="form1" method="post" action="" onSubmit="starwu()">
      <input name="Submit" type="submit" value="提交">
    </form>
    </body>
    </html>