Ф><button onClick="window.close(); return true;"> Ф>
<button onClick="MyFunc()"> <script> function MyFunc() { window.close(); } </script> Ф>