gpt4 book ai didi

javascript - 单击后弹出窗口和重定向

转载 作者:行者123 更新时间:2023-11-28 18:33:24 24 4
gpt4 key购买 nike

我想要实现的是使用 windowopen() 函数打开一个弹出窗口。同时在主窗口中将用户带到另一个页面。

 <a href="http://www.google.com/" class="thumbnail" 
onclick="return !window.open(this.href, 'Google', 'width=500,height=500')"
target="_blank">
Link
</a>

因此,一旦用户单击链接,我希望弹出窗口加载Google,并希望原始页面将用户导航到.index.php,有什么建议吗?

最佳答案

<a href="http://www.google.com/" class="thumbnail" 
onclick="window.open(this.href, 'newwindow', 'width=500,height=500'); return true;">
Link
</a>

关于javascript - 单击后弹出窗口和重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37545217/

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