Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
window.name Property in Window Object of Javascript Syntax with Examples
2276 Views
Usage 
The name function is used to return the name of the current window.
Syntax 
Window.name
Example
<button onclick="Wname()">Click</button>

function Wname() {
    var myWindow = window.open("", Currentwindow", "width=200, height=200");
    myWindow.document.write("<p>This window's name is: " + myWindow.name + "</p>");
}
Output 
Once we press the click button,window will be opened with message " This window's name is:Currentwindow"
Previous Topics
Previous lessons of current book.
Best Lessons of "Javascript Syntax with Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details