Window open() Method - Open multiple windows: - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window open

Description

Window open() Method - Open multiple windows:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p>Click the button to open multiple windows.</p>

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

<script>
function myFunction() {/*from  w ww .ja  v  a2s. co  m*/
    window.open("http://www.google.com/");
    window.open("https://www.java2s.com/");
}
</script>

</body>
</html>

Related Tutorials