这段代码是否需要浏览器弹出窗口才能被允许asp.Net

时间:2019-06-13 03:46:38

标签: asp.net

此代码是否需要允许asp.Net弹出浏览器?

<script type="text/javascript">
            function open_window(url, width, height) {
            var my_window;

            var center_left = (screen.width / 2) - (width / 2);
            var center_top = (screen.height / 2) - (height / 2);

            my_window = window.open(url, "Title", 
               "scrollbars=1, width=" + width + ", height=" + height 
                + ", left=" + center_left + ", top=" + center_top);
            my_window.focus();
        }
</script>

HyperLink1.NavigateUrl = "javascript:open_window('addnewsr.aspx?id=" + txt_uid.Value + "&type=BM',900,500);";

0 个答案:

没有答案