Remember status after reload of page
I have a script that has a button wich simply removes itself when clicked. But when I reload the page the button appears again.
How can I add a "memory" so that the button is gone also after reloading?
Here is the script jq2.html
- <!DOCTYPE html>
- <html>
- <head>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
- </script>
- </head>
- <body>
- <!--hiding the current HTML element-->
- <script>
- $(document).ready(function(){
- $("#x").click(function(){
- $(this).hide();
- });
- });
- </script>
- <button id="x">Click me and I'm gone</button>
- <br/>
- <form name="input" action="jq2.html" method="get">
- Username: <input type="text" name="user">
- <input type="submit" value="Submit">
- </form>
- </body>
- </html>