I am making a html file for myself and want to be able to enter variables then close the program and when I open it agian it will still remember the variable without me having to enter it again? Is this possible to do
Asked
Active
Viewed 231 times
-1
-
2with Javascript, yes. With HTML, no. – sevenseacat Jun 04 '14 at 01:24
-
Could you tell me how to do it with JavaScript – user3705061 Jun 04 '14 at 02:04
-
possible duplicate of [Save all JavaScript variables on a page](http://stackoverflow.com/questions/15484532/save-all-javascript-variables-on-a-page) – jww Jun 18 '14 at 03:36
-
Did you do it? Don't forget to mark my answer as Correct Answer if it helped you out. – Alek Arsovski Jun 18 '14 at 18:25
1 Answers
1
This is how you can set and get variables from local storage:
localStorage.setItem("Key", "Value");
alert(localStorage.getItem("Key"));
This will display Value on the screen.

Alek Arsovski
- 339
- 3
- 18