javascript - how to close current window after href to a download link -


i have html code this:

<script type="text/javascript">     initpage(); // someting      location.href = "http://mail//download.php?lcaction=5" //download file link     // window.open("http://mail//download.php?lcaction=5");      // close current window, can not work     window.opener = null;     window.open("", "_self");     window.close(); </script> 

when try use window.open instead of href, works in chrome, fails in ie.

what can make work properly?


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

visual studio - NuGet Automatic Package Restore when using git submodules -

mysql - How to Link PHP Sub Categories(Pages) Dynamically -