Javascript Browser Window open() Method Open multiple tabs

Introduction

Open multiple tabs:

Click the button to open multiple tabs.

View in separate window

<!DOCTYPE html>
<html>
<body>


<button onclick="myFunction()">Open Windows</button>

<script>
function myFunction() {/*w w  w . ja va 2  s.  c o m*/
  window.open("https://www.java2s.com/");
  window.open("https://www.java2s.com/");
}
</script>

</body>
</html>



PreviousNext

Related