for a normal link <a href="xxx" target="_blank">, the link will open at a new window(or tab).
I like to know if there’s a way to open it in background, and keep current window still active.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After you
openthe new window (we’ll call itnewWindow), do this:This is usually called a “pop-under.” Opening the window won’t usually work unless it’s initiated by a user action like a mouse click, due to pop-up blockers built into most web browsers.
Just remember to get a handle to your new window when you open it.
Also, if your pop-under is loading content from another domain, you’ll need to do the
blur/focusthing before you send the window to its destination, otherwise you’ll run into the same-origin problem.HTML:
JS: