+ 1
How to open 2 links in one click?
6 ответов
+ 4
use: _blank
it will open them in two separate tabs
+ 3
Without JavaScript, it's not possible to open two pages by clicking one link unless both pages are framed on the one page that opens from clicking the link. With JS it's trivial:
<p><a href="#" onclick="window.open('http://google.com'); window.open('http://yahoo.com');">Click to open Google and Yahoo</a></p>
Do note that this will be blocked by popup blockers built into web browsers but you are usually notified of this.
+ 2
What are you trying to achieve? Anything in specific. Provide more details.
+ 1
I tried putting 2 links it only open first link
+ 1
for example code to open www.google.com and www.youtube.com in one click
+ 1
code to open 2 links in one click