const link = document.createElement("a")
link.href = `https://www.baidu.com`
link.target = "_blank"
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
07-07
5654
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
const link = document.createElement("a")
link.href = `https://www.baidu.com`
link.target = "_blank"
document.body.appendChild(link)
link.click()
document.body.removeChild(link)