Pop up on Exit

Is there a way to offer a "wait, before you leave" type pop-up?