Window name Property
Create a window with the open() method, and return the name of the new window:
myWindow.document.write("<p>This window's name is: " + myWindow.name + "</p>");
More "Try it Yourself" examples below.
Definition and Usage
The name property sets or returns the name of the window.
This property is often used to modify the name of a window, after the window has been created.
Note: The name of the window is often used for setting targets for hyperlinks and forms. However, this is not required, as windows do not need to have names.
Return the name property:
Set the name property:
|winName||String||Specifies the name of the window|
|Return Value:||A String, representing the name of the window.
Note: If the name is not specified, this property returns "view"
Set the name of the current window to "myWindowName":