gpt4 book ai didi

javascript - 我的 html 代码不能作为目标空白

转载 作者:行者123 更新时间:2023-12-03 09:06:25 25 4
gpt4 key购买 nike

我的html代码不能作为目标空白,点击时不会打开新窗口。

<a onclick="javascript: window.location = 'myurl','_blank'"; ></a>

最佳答案

您必须使用属性hreftarget

<a href="myurl" target="_blank">Your element</a>

关于javascript - 我的 html 代码不能作为目标空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32179087/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com