Gnanu

Gnanu

  • 1.6k
  • 52
  • 8.7k

Window.Close() in MasterPage

Apr 16 2019 8:09 AM
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)