JavaScript antes de la alerta de la página de recarga

<script type="text/javascript">
 window.onbeforeunload = function () {
  return 'Are you really want to perform the action?';
 }
</script>
Rich Reindeer