window.open with target “_blank” in Chrome

后端 未结 5 1339
清歌不尽
清歌不尽 2020-12-06 10:20

I have a small javascript function which opens an url in a new tab:

function RedirectToPage(status) {
   var url = \'ObjectEditor.aspx?Status=\' + status;
           


        
5条回答
  •  长情又很酷
    2020-12-06 10:43

    As Dennis says, you can't control how the browser chooses to handle target=_blank.

    If you're wondering about the inconsistent behavior, probably it's pop-up blocking. Many browsers will forbid new windows from being opened apropos of nothing, but will allow new windows to be spawned as the eventual result of a mouse-click event.

提交回复
热议问题