Course Content
Javascript Full Course
0/87
JavaScript Course
About Lesson

The Javascript Window.Open() method is used to open the web pages into a new window or a new tab. It depends on the browser settings and the values that are assigned to the parameter.

Syntax:

window.open(URL, name, specs, replace)

Parameters: This method accepts four parameters as mentioned above and described below:

  • L: It is an optional parameter. It is used to set the URL of web pages that need to open. If the URL is not set then window.open() method open a blank window.
  • name: It is an optional parameter and is used to set the window name.
  • specs: It is an optional parameter used to separate the item using a comma.
  • replace: It is an optional parameter and used to specify the URL URL creates a new entry or replaces the current entry in the history list. This parameter returns a boolean value. If this parameter returns true then the URL replaces the current document in the history list and if returns false then the URL creates a new entry in the history list.

Window.close(): This method is used to close the window which is opened by the window.open() method.

Syntax:

window.close()

Parameters: This method does not contain any parameters.

Return Value: This method does not return any value.

Exercise Files
No Attachment Found
No Attachment Found
Join the conversation

Introducing Official ApeStaking Protocol for ApeCoin.

New Blur NFT Marketplace Courting Professional.