<script language="javascript">
<!--
function logout(){
if (confirm("你确定要注销身份吗?\n是-选择确定,否-选择取消")){
window.location.href="logout.asp?act=logout"
}
}
-->
</script>用window.location.href或者<%response.redirect "logont.asp"%>

解决方案 »

  1.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled Document</title>
    </head><script type="text/javascript" language="javascript"> 
    function quitRedirect(sUrl)
    {
        if(window.name!="ojlovecd")
        {
            window.name="ojlovecd";
        }
        else
        {
            window.location.href=sUrl;
        }
    }
    </script><body onload="quitRedirect('http://www.csdn.net');">
    </body>
    </html>
      

  2.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <script language="javascript">
    function quitRedirect(sUrl){
       location.href=sUrl;
    }
    </script>
    <body onbeforeunload="javascript:quitRedirect('/HertsTestFile/1.asp')">
    </body>
    </html>
      

  3.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <script language="javascript">
    function quitRedirect(sUrl){
        window.location.href=sUrl;
        
    }
    </script>
    <body onbeforeunload="javascript:quitRedirect('/HertsTestFile/1.asp')">
    </body>
    </html>