My browser allows any website to show pop-ups (made using window.open
).
window.open("http://www.google.com/","_blank");
The above code opens google.com
on a new tab.
However, when I use window.open
repeatedly like this:
window.open("http://www.google.com/","_blank");
window.open("http://www.facebook.com/","_blank");
window.open("http://www.example.com/","_blank");
Now, google.com
is opened on a new tab, while facebook.com
and example.com
are opened as pop-up windows. I actually want to have the 3 links to open in new tabs but I can't achieve that.
How can I fix this?