3
Answers

Window.Close() in MasterPage

Gnanu

Gnanu

5y
1.6k
1
var exit = confirm("Do u want to close browser!");
if (exit) { window.close() }
else { }
 
If user clicks yes then i need to close browser but Window.close() is not working
its showing 
"Scripts may close only the windows that were opened by it."  
Its from Master page.
Is their any other way to close the browser with the help of javascript. 
Answers (3)