Click here to Skip to main content
15,894,410 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I need to close the page on pageload.

I tried With

JavaScript
$(document).ready(function(){
window.close();
});


It only works on IE .

I need to work it on all browsers.
Posted

this might help you
window-close[^]
 
Share this answer
 
Nice solution in SO[^]
Please try the above solution.
This might help you.
Thanks
 
Share this answer
 
this works in chrome, glitchy in IE10 and doesnt work in firefox

Close this tab
Close this tab and open an identical tab

window.close()
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900