Use Sqlite in Html5
- There are three ways to store data using html5
- using database (sqlite)
- using localStorage
- will only store on client, will not send to server
- this data can be read even using different block on the same browser
- the data will not disapear unless you delete it
- using sessionStorage
The localStorage and sessionStorage are storing the data on your computer and after the web page is loaded
- we can use javascript to get the data
running the first time
- use all the following code can see the db insert and query successfully
- but in the second time
- you should note the create and insert
- then you can see the result
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|