Window open() Method - Open a new window and control its appearance: - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window open

Description

Window open() Method - Open a new window and control its appearance:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Test</button>

<script>
function myFunction() {/*from w  w w .ja  v  a 2s  .c  o  m*/
    window.open("http://www.java2s.com", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400");
}
</script>

</body>
</html>

Related Tutorials