📜  响应 onclick 新选项卡 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:12.438000             🧑  作者: Mango

代码示例2
const openInNewTab = (url) => {
  const newWindow = window.open(url, '_blank', 'noopener,noreferrer')
  if (newWindow) newWindow.opener = null
}