We don't offer a tool for this, but it is possible to add manually with javascript. Here is a discussion that offers solutions:
https://stackoverflow.com/questions/1119289/how-to-show-the-are-you-sure-you-want-to-navigate-away-from-this-page-when-ch