How to open several tabs in chrome at once?

I create a coupons product and want to open 4 tabs with one click, this happens in firefox, but in chrome only 2 links can open and the other two are blocked.

Here is what I tried

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(function() {
    $('[data-popup-open]').on('click', function(e)  {
        window.open('https://www.google.com');
        window.open('http://www.facebook.com');
        window.open('http://www.stackoverflow.com');
        window.open(window.location.href);

    });
});
</script>
</head>
<body>
    <a class="btn" data-popup-open="popup-1" href="#">Open Popup #1</a>
</body>
</html>
+4
source share
3 answers
$(document).ready(function() {

    var linksArray =['https://www.google.com','http://www.facebook.com','http://www.stackoverflow.com'],i;

    $('#open').click(function() {for( i=0; linksArray.length > i; i++){

        window.open(linksArray[i]);
  }
    });
});

Work with me with a loop, https://jsfiddle.net/donS/6dcmsg4n/

+3
source

Try:

window.open("https://www.google.com", '_blank');
0
source

. JavaScript.

-3

All Articles