Javascript - Open a given URL in a new tab by clicking a button

前端 未结 13 469
一生所求
一生所求 2020-12-04 13:35

I would like to have a button that redirects to a given URL and opens in a new tab. How can this be done?

13条回答
  •  萌比男神i
    2020-12-04 14:28

    I just used target="_blank" under form tag and it worked fine with FF and Chrome where it opens in a new tag but with IE it opens in a new window.

提交回复
热议问题