Thursday, 13 October 2011

HTML5 IndexedDB

With the present inconsistent state of HTML5 across browsers, this example is best viewed in using Google’s Chrome browser.

I’ve been playing around with the IndexedDB object storage in HTML5.

Here we have a simple form to enter data into our IndexedDB. 

As an aside, the form also uses the HTML5 “required” attributes, with CSS to display a red star when an input field is invalid and green thumbs up when valid.


Here’s a link to the online example:

The HTML and CSS are pretty basic, all the magic happens within the JavaScript.

HTML code

JavaScript Code

No comments:

Post a Comment