According to the example of an HTML5 pioneer in China, I copied an example of using HTML5API to operate a local SQLite database. I feel that this function is quite fun, but it is not powerful enough, especially the browser is not powerful enough: HTML code :!
According to the example of an HTML5 pioneer in China, I copied an example of using HTML5API to operate a local SQLite database. I feel that this function is quite fun, but it is not powerful enough, especially the browser is not powerful enough: HTML code :!
According to the example of a pioneer in HTML5 in China, I copied an example of using HTML5 APIs to operate a local SQLite database. I feel that this function is quite interesting, but it is not powerful enough. In particular, the browser is not powerful enough:
HTML code:
Javascript encapsulates many methods, such as saving data to the database, updating, and synchronizing the list below.
I did a test on Google Chrome. The following is:
Chrome I am using the latest version. Suppose I have installed it in C: \ Documents ents and Settings \ charles. wang \ Local Settings \ Application Data \ Google \ Chrome
Then the SQLite database is installed in $ CHROME_HOME \ User Data \ Default \ databases.
In this directory, databases. db is the configuration of all the databases created by the current user, while the file _ 0 directory is the database table file directory:
You can use the SQLite management tool to open these two files:
Configure the Databases used in Databases. db:
This is the same as the setting in js:
When we open the database file, we can see that:
The records in these databases are displayed on the page.
Limitations:
Unfortunately, I tested the Firefox browser (Version 12) that programmers like most, the U.S. server. Unfortunately, it does not support this local database SQLite or virtual host, (I opened the Firebug console ):
I hope this problem can be improved in the future. After all, there are still many people using Firefox, especially programmers.
This article is from the "parallel line cohesion" blog, Hong Kong virtual host, please be sure to keep this source