Javascript examples for Browser Object Model:Window open
Open a window with parameter setting
<html> <head> <title>Foo</title> </head> <body> <input type="button" id="the-button" value="Click me"> <script> var w = 400, h = 600; top = 1, left = 1; document.getElementById("the-button").onclick = function() { var newWindow = window.open('http://java2s.com', 'PopupChat', 'directories=no,location=no,menubar=no,titlebar=no,toolbar=no,scrollbars=yes,status=no,width=' + w + ', height=' + h + ',top=' + top + ',left=' + left); }; </script> </body>//from w w w . ja va 2 s . com </html>