Windows and JavaScript

Using JavaScript, we can manipulate windows in a variety of ways, such as open one, close it, reload its page, change the attributes of the new window etc.

Opening a new window using JavaScript

Lets start at the very top- "How do I open a new window in JavaScript?" Appropriately enough, by using a JavaScript method called "":"")

When the above code is run, a new window opens containing the specified URL, similiar in behavior to the "target" attribute of a link. Lets say you just want to open a window containing Yahoo using a form button:

<input type="button" value="Click here to see" onclick="'')" />

The above button merely opens an ordinary looking new window. However, where JavaScript shines when it comes to manipulating windows is the ability to customize the look of them, whether it's the windows' dimensions or look.