gpt4 book ai didi

windows - 在同一浏览器选项卡中打开链接

转载 作者:可可西里 更新时间:2023-11-01 10:59:17 25 4
gpt4 key购买 nike

如何在同一浏览器选项卡中打开链接?我试过这段代码:

ShellExecute(Handle, 'open', 'http://site.com', '_self', nil, SW_SHOWNORMAL);

但它继续在新表中打开链接。

谢谢。

最佳答案

I've written on this topic before :

ShellExecute has absolutely no notion of "tab." In fact, it doesn't even have a notion of "default browser." All it does is find whatever program is configured for file names that start with "http://" and execute the configured command line.

What the browser does with the new command line is its own choice. The API function has no control. Sometimes, the browser allows the user to configure it.

Opening a new tab or window is the safest thing to do. Neither you nor the browser knows whether the user is still using the previous tab or window.

关于windows - 在同一浏览器选项卡中打开链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11087969/

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