There are many posts on this, but none seem to have a solution.I think it can be done.
If you have a link with target='_blank'
, the page will open in a new tab, and it will be in focus.
However, if you press the CTRL
key when you click that link, the new tab will be in the background.
Therefore, if you can use JavaScript to simulate a CTRL
press, it should work.
I saw someone post a code trying this, but it was old and used initMouseEvent
which is depreciated. I think that's why it didn't work. Could there be a simple way to do this, something like...
<a href='https://example.com' onclick='...code to simulate CTRL key here...'>CLICK ME</a>