M
M
Miku Hatsune2015-11-29 18:32:21
HTML
Miku Hatsune, 2015-11-29 18:32:21

How can I make it open in a new tab when I click on a link?

But so that the browser does not show it immediately? that is, I add to the link: target="_blank"
But when I click on the link, I immediately go to a new tab, but I need to stay in the current one.
That is, just like when you click on the link with the wheel.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Thegaar, 2015-11-30
@Hatsune-Miku

Use the search, dear) How to simulate a mouse wheel click (js)?

M
MiiNiPaa, 2015-11-29
@MiiNiPaa

Go to browser settings and change the behavior when opening a new window.
You can programmatically try to remove the focus from the new window and return it to the old one, but browsers often hit on the fingers for this (and of course it does not work in all browsers)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question