Skip to content

How to open all links on a page | Example code

  • by

You can use Window open method into a anchor tag to open all links on a page.

How to open all links on a page Example

HTML example opening a 2 tabs, but you can add more tabs.


     '','','width=700,height=500')">Click Here</a>

Output: Note (Unblock the pop up windows for your browser and the code could work)

open all links on a page

Basic implementation in JavaScript

Open all link on a single link click.


	<a href="" id="multi-link-opener" onclick="openMultipleLinks(myLinks)">Click To Open Links</a>

		var myLinks = [

		function openMultipleLinks(links) {
			for (var i = 0; i < links.length; i ++) {[i]);

Do comment if you have any doubts and suggestions on this topic.

Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.