JavaScript antes do alerta da página de recarga

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