Solution: The link will be open when the mouse moves over the text. It returns a newly created window, or NULL if the call gets failed.
window.open( URL, name, Specs )
Parameters: This function accepts three parameters as mentioned above and described below:
- URL: It is optional parameter. It is used to specify the URL of the web page which need to open. If URL is not specified then a new Window is open.
- Name: It is an optional parameter which is used to specify the target attribute.
- _blank: The URL is loaded into the new window. It is optional.
- _top: The URL replaces the current page.
- Specs: It is an optional parameter. It is a comma-separated list of items, no whitespace.
- Height: It represents the height of window in the pixel.
- Width- It represents the width of window in the pixel.
Note: Allow Pop-up of Web Browser.
Program 1: URL is loaded into the new window.
Program 2: URL is loaded into the current Window.
Program 3: URL is loaded into the new window of specific size.
This article is attributed to GeeksforGeeks.org