Asp.Net页面刷新防止跳转到其他浏览器或新的选项卡

前端页面js代码:

<head>    
    <script> 
        window.name = "PremaritalCheckup_ManSocietyAgreeForm";
    </script>
    <base target="_self" />
</head>

<form id="form1" runat="server" target="PremaritalCheckup_ManSocietyAgreeForm">

window.name中赋值的值是form中target中的值

原文地址:https://www.cnblogs.com/Mrliang007/p/11407064.html