AS I need JavaScript / jquery Code for Closing Browser\'s ( FireFox / Chrome and IE..)
As I have try with window.close()
But it only work for IE.
Can check Browser and write respective script for IE / FireFox
IE---->
window.close()
FireFox --->
var answer = confirm("Do you want to close this window ?");
if (answer){
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
window.close();
}
else{
stop;
}
Windows can only be closed by scripts (window.close()) that were opened by scripts in the first place. So generally, this isn't possible (https://developer.mozilla.org/en/DOM/window.close)
Try this snippet
window.close()
I don't think that is possible as javascript can only interact with the pages rendered by the browser, not the actual browser.
This worked for IE and Chrome. (window.close() worked for IE, then win.close for chrome)
<script type="text/javascript">
function CloseThis() {
var win = window.open('', '_self');
window.close();
win.close(); return false;
}
</script>