So here's a simple but interesting question, how can I open multiple links using single <a>
element?
Using this only opens the first href
<a href="http://www.google.com" href="http://www.yahoo.com" target="_blank">Click Here</a>
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. Open links in new tabs are the default action of the add-on, but you can change it open in new windows.
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.
You can't have a link go to two places, but you can have it go to a php script that redirects to the second page when it's done doing whatever you need it to do.
You can certainly try this
Demo
<a href="http://www.microsoft.com" target="_blank" onclick="window.open('http://www.google.com'); window.open('http://www.yahoo.com');">Click Here</a>
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