To close current tab window.top.close();
window.top.close(); this will close the current tab for you.