+ 3
Close Tab
How do you close a tab in html or js? This will work han-in-hand with a confim box.
1 Respuesta
+ 2
You have to check what the user has pressed:
if(confirm("Close Window?")){//a confirm box is shown
{
//user pressed yes
window.close(); //closes the current tab
}
else
{
//user pressed no
//do something else
}