Skip to content
Advertisement

Alert message on button click event

I have a button and textbox on my page aspx and on button click event I am displaying alert message.

Now when I run website and click on button it display message but after that when I press F5 (Refresh) it again display message. So my question how to remove message when I click F5.

Below is my code for button click:

JavaScript

and

JavaScript

Advertisement

Answer

Change your script as follows

JavaScript

where i assumed Default.aspx is your page

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement