Skip to content Skip to sidebar Skip to footer

How To Open Multiple Tabs From One Html File

I work on many computers, which means they use default browser settings (There is no point in changing browser settings, because I will have to do it every time). I need to make an

Solution 1:

How about using a batch file? I just tried it in Windows 7 with Chrome and it opened all 3 URLs in the same window.

Make a plain text file with Notepad called file-name.bat. Then add this code:

start chrome.exe http://www.google.com
start chrome.exe http://www.yahoo.com
start chrome.exe http://www.microsoft.com

All you should have to do is double click it to run it. You may get a security warning (I didn't).

You could check this out too: Batch file for opening one of a list of URLs

Solution 2:

<scripttype='text/javascript'>
(function(){
  //add this line for each website you want to openwindow.open("http://www.facebook.com/",'');
})()
</script>

there are more answers to this question that work here

Solution 3:

Try this example. I hope this something like this is what you want. About popup blocked you have to configure your browser to allow popup opened from this page. The easiest that I know to bypass the popup blocker is put this page inside local server like apache and set your browser to allow popup from localhost.

<html><script>functionopenLinks(){
links = document.getElementsByTagName('a');

 for (i = 0; i < links.length;i++){ 
   window.open(links[i].getAttribute('href'),'_blank');
   window.focus();
 }
}
</script><bodyonload="openLinks()"><ahref="http://google.com">google</a><ahref="http://stackoverflow.com">stackoverflow</a><ahref="http://facebook.com">facebook</a><!-- add other link --></body></html>

Solution 4:

This functionality is built into Chrome. If you don't have to use an HTML file, try just setting your Startup Pages in Chrome's settings. You can add as many pages as you want.

http://support.google.com/chrome/bin/answer.py?hl=en&answer=95421

enter image description here

Solution 5:

You could just add window.open(adress) for every page you want to open, or you could use a for loop if you want to open 1 page a specific number of times.

Post a Comment for "How To Open Multiple Tabs From One Html File"