Create a window with the open() method, and return the name of the new window:
More "Try it Yourself" examples below.
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.
Property | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
Return the name property:
Set the name property:
Value | Type | Description |
---|---|---|
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":