JavaScript open window

How to open a link/url in new window or tab

The open() method is part of the global variable Window. Window is representing where the script is running and exposes the JavaScript code.

With the open() method you can open a new window or tab the specified url.

Accepts three parameters, all optional.

open()
open(url)
open(url, target)
open(url, target, windowFeatures)

url
The url is what the new window will try to open

target
The target specifies the context of the newly created window or tab. If the passed target doesn't identify an existing context, a new context will be created. You can also use the special keywords (_self, _blank, _parent,  _top) .

windowFeatures
String containing comma-separated list of window features. ex. height=200