Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
window.close() Method in Window Object of Javascript Syntax with Examples
1088 Views
Usage 
The Close() method is used to close the window.
Syntax 
webpage.close();
Example
<button onclick="javascript:showwindow();">Close</button>
var webpage = window.open("http://www.knowledgewalls.com","","width=800,height=300");

function showwindow(){
  webpage.close();
}
Output 
Once we run the run, it will display the webpage.We can use "close" button to close the window.
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