+ 3

How to save data from html

I want to create a "website" which memories and calculate my marks How to save date from cell and you after. Example: I open HTML file in browser Enter date and Mark Exit from file (how to add auto save option) When I open again data isn't lost

29th Dec 2018, 1:45 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
2 Antworten
+ 4
Depending on how much you need to be saved, the answer could be as simple as a couple cookies. However, I would personally prefer some type of database for it. Firebase is extremely simple to use, and free
29th Dec 2018, 2:39 PM
Jax
Jax - avatar
+ 4
Use LocalStorage Eg: var x="Your String"; localStorage.userVariable=x; During re-open Check window.onload=function(){ var restore; If(localStorage && localStorage.userVariable){ restore=localStorage.userVariable; } } (*userVariable - which is defined by user) Usage of if statement: If((Statement check the browser compatibility) && (checking the user data))
30th Dec 2018, 3:05 PM
Kelvin Paul
Kelvin Paul - avatar