Monday, October 14, 2013

Auto webpage close without any alert message

Insert below code in head section if you want to auto close your webpage.

<script>
window.open('','_self','');
window.close();

</script>

If we want to close your web page after execution of  any php code then insert below code after the main php code

echo "<script>
window.open('','_self','');
window.close();

</script>
";


No comments:

Post a Comment