In this recipe, we will take the database we created in the previous recipe and add tables and data to it then display the results on an HTML page.
You will need a current browser and an HTML5 page with basic tags for the head area and body area.
On a basic HTML5 page, add an h1
tag to display a page heading, and then create a div
tag with an ID of "status" to hold our results as shown in the following code block:
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Using WEB SQL Databases</title></head><body><article><section><header><h1>Today's Riders</h1></header><div id="status" name="status"></div> </section></article><footer>
Begin the script as shown in the previous recipe to create the database if you have not already. Create a new variable named info, and then create a...