Hi Kokila,
Use the below link to alert the user through Javascript,
https://stackoverflow.com/questions/38306510/alert-on-browser-back-button-click-or-page-refresh
Use Javascript action widget for the alert code