I have some text in a link. When I click on it I must open 2 pages. No problem here... but the trick is that I am not allowed to use JavaScript. Is this possible only with HTML?
You can try this in the anchor tag. Where in anchor tag use onclick method with the open method. Define both links using the open method, it will open two links with one click.
Just right click on the link and hold it to drag a box around the links. When you release the right click of your mouse, all those links will open in new tabs.
The first link is a Google Font. You can have as many as you want. Show activity on this post. You cannot add multiple href's to the same link tag.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With