How to have a pop up with close button when I try to close the page

Hi,

As I am trying to close the webpage, I like to display a pop up with close button. How can I achieve that?

Thanks.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/22/feed