I have <input type='number'>
and I am saving it to localStorage.
But after refresh the value inserted before refresh did not remain saved.
Is there a way to keep value saved?
Asked
Active
Viewed 168 times
0

Petr Seifert
- 3
- 3
-
possible duplicate of https://stackoverflow.com/questions/38930144/keep-input-value-after-refresh-page – Mario Perez Apr 28 '20 at 20:00
-
Please show the code where you are saving it to local storage. Note that you'll also need code to pull it out of local storage and populate the input. – Heretic Monkey Apr 28 '20 at 20:02
1 Answers
0
Set and Get Local Storage using JavaScript
Set value in local Storage
localStorage.setItem("localStorageValue", "local Storage value");
Get value from local storage
localStorage.getItem("localStorageValue");

Bhanu Pratap
- 1,635
- 17
- 17