To close a tab window with a confirmation dialogue in Javascript you can use the following snippet.

Sample JS

function CloseTab() {
  if (confirm("Do you want to close this Window?")) {
    close();
  }
}

2 thought on “How to close a tab window with a confirmation dialogue in Javascript”

Leave a Reply