Javascript to open URL within a new Tab (instead of a window)

后端 未结 1 1394
甜味超标
甜味超标 2021-01-26 03:24

Hey guys. There are a few entries here requiring solutions to do the opposite of this, and others vaguely related. In one of them, the poster asked how to do this on Mozilla Fir

相关标签:
1条回答
  • 2021-01-26 03:49

    The obvious answer is to open the link with target="_blank". As you said, Firefox and Chrome will open a new tab.

    Regarding IE - the behavior is up to browser preferences. By default (in IE7+ obviously) I believe the behavior is defined as open new tab. If the user decided the behavior should be a new window, there's only so much you can do about it.

    0 讨论(0)
提交回复
热议问题